Add test for import job handler. Improve error messages.

This commit is contained in:
Jan Eitzinger
2022-09-23 15:23:45 +02:00
parent c9184a7575
commit 5c715b6ec2
8 changed files with 838 additions and 7 deletions

View File

@@ -53,7 +53,7 @@ func Init(flagConfigFile string) {
}
} else {
if err := schema.Validate(schema.Config, bytes.NewReader(raw)); err != nil {
log.Fatal(err)
log.Fatalf("Validate config: %v\n", err)
}
dec := json.NewDecoder(bytes.NewReader(raw))
dec.DisallowUnknownFields()