Skip to content

Commit

Permalink
Show migration validation error (#22619)
Browse files Browse the repository at this point in the history
Discord request:
https://discord.com/channels/322538954119184384/322910365237248000/1067083214096703488

If there is a json schema validation error the full file content gets
dumped into the log. That does not help and may be a lot of data. This
PR prints the schema validation error message instead.
  • Loading branch information
KN4CK3R authored Jan 27, 2023
1 parent 2903afb commit 5ff037e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/migration/file_format.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func validate(bs []byte, datatype interface{}, isJSON bool) error {
}
err = sch.Validate(v)
if err != nil {
log.Error("migration validation with %s failed for\n%s", schemaFilename, string(bs))
log.Error("migration validation with %s failed:\n%#v", schemaFilename, err)
}
return err
}
Expand Down

0 comments on commit 5ff037e

Please sign in to comment.