osbuild-worker: Convert osbuild raw json error to a string for logging

Without this you get an array of bytes in the logs. Convert the raw json
output from osbuild to a string so there is some hope that it is
readable.
This commit is contained in:
Brian C. Lane 2024-03-06 10:58:41 -08:00 committed by Simon de Vlieger
parent b89293ea94
commit ceddabc395

View file

@ -533,7 +533,7 @@ func (impl *OSBuildJobImpl) Run(job worker.Job) error {
if !osbuildJobResult.OSBuildOutput.Success {
var osbErrors []error
if osbuildJobResult.OSBuildOutput.Error != nil {
osbErrors = append(osbErrors, fmt.Errorf("osbuild error: %v", osbuildJobResult.OSBuildOutput.Error))
osbErrors = append(osbErrors, fmt.Errorf("osbuild error: %s", string(osbuildJobResult.OSBuildOutput.Error)))
}
if osbuildJobResult.OSBuildOutput.Errors != nil {
for _, err := range osbuildJobResult.OSBuildOutput.Errors {