aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2023-01-27 13:56:00 +0100
committerGitHub <noreply@github.com>2023-01-27 20:56:00 +0800
commit5ff037ef51090b9ac8f521466d99456b236926be (patch)
treebaa1722c5b24fd42dc77a7e4a3db37fcd63ee288 /modules
parent2903afb78f77ed94c0515a6e58e27c23a13f2671 (diff)
downloadgitea-5ff037ef51090b9ac8f521466d99456b236926be.tar.gz
gitea-5ff037ef51090b9ac8f521466d99456b236926be.zip
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.
Diffstat (limited to 'modules')
-rw-r--r--modules/migration/file_format.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/migration/file_format.go b/modules/migration/file_format.go
index f319f02ef1..04e5d76981 100644
--- a/modules/migration/file_format.go
+++ b/modules/migration/file_format.go
@@ -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
}