Merge pull request #4946 from mikix/json-errors

Improve error handling in --json mode
This commit is contained in:
Michael Eischer
2024-08-10 17:04:56 +00:00
committed by GitHub
18 changed files with 269 additions and 80 deletions
+1 -2
View File
@@ -164,9 +164,8 @@ func runRestore(ctx context.Context, opts RestoreOptions, gopts GlobalOptions,
totalErrors := 0
res.Error = func(location string, err error) error {
msg.E("ignoring error for %s: %s\n", location, err)
totalErrors++
return nil
return progress.Error(location, err)
}
res.Warn = func(message string) {
msg.E("Warning: %s\n", message)