worker: log error details on job failure

Currently errors like clienterror 28 ("at least one target failed") have
all the relevant information in the details, don't omit these details
from the worker logs.
This commit is contained in:
Sanne Raymaekers 2022-09-27 20:03:51 +02:00 committed by Ondřej Budai
parent c6a960fca8
commit a132113452

View file

@ -170,6 +170,9 @@ func validateResult(result *worker.OSBuildJobResult, jobID string) {
logWithId := logrus.WithField("jobId", jobID)
if result.JobError != nil {
logWithId.Errorf("osbuild job failed: %s", result.JobError.Reason)
if result.JobError.Details != nil {
logWithId.Errorf("failure details : %v", result.JobError.Details)
}
return
}
// if the job failed, but the JobError is