Skip to content

Commit

Permalink
osbuild-worker: Convert osbuild raw json error to a string for logging
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bcl authored and supakeen committed Mar 8, 2024
1 parent b89293e commit ceddabc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/osbuild-worker/jobimpl-osbuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ceddabc

Please sign in to comment.