From ceddabc395a79eae7f6e0d56e4e5b6d0e5bba103 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Wed, 6 Mar 2024 10:58:41 -0800 Subject: [PATCH] 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. --- cmd/osbuild-worker/jobimpl-osbuild.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/osbuild-worker/jobimpl-osbuild.go b/cmd/osbuild-worker/jobimpl-osbuild.go index 1a5367912..f993afc32 100644 --- a/cmd/osbuild-worker/jobimpl-osbuild.go +++ b/cmd/osbuild-worker/jobimpl-osbuild.go @@ -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 {