Skip to content

Commit 5ff037e

Browse files
authored
Show migration validation error (#22619)
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.
1 parent 2903afb commit 5ff037e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/migration/file_format.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func validate(bs []byte, datatype interface{}, isJSON bool) error {
7676
}
7777
err = sch.Validate(v)
7878
if err != nil {
79-
log.Error("migration validation with %s failed for\n%s", schemaFilename, string(bs))
79+
log.Error("migration validation with %s failed:\n%#v", schemaFilename, err)
8080
}
8181
return err
8282
}

0 commit comments

Comments
 (0)