osbuild-worker: log unknown upload type

Make the target error a bit more useful by sending the name of unknown
upload target.
This commit is contained in:
Martin Sehnoutka 2021-03-19 10:05:03 +01:00 committed by msehnout
parent dfa227e82f
commit 9ba6dcec4e

View file

@ -451,7 +451,7 @@ func (impl *OSBuildJobImpl) Run(job worker.Job) error {
osbuildJobResult.Success = true
osbuildJobResult.UploadStatus = "success"
default:
err = fmt.Errorf("invalid target type")
err = fmt.Errorf("invalid target type: %s", args.Targets[0].Name)
appendTargetError(osbuildJobResult, err)
return nil
}