Skip to content

Commit

Permalink
osbuild-worker: fix handing over error details
Browse files Browse the repository at this point in the history
without the ".Error()" the json serialization fails
  • Loading branch information
schuellerf committed Apr 29, 2024
1 parent d846b4d commit 85feb6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/osbuild-worker/jobimpl-osbuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ func (impl *OSBuildJobImpl) Run(job worker.Job) error {

osbuildVersion, err := osbuild.OSBuildVersion()
if err != nil {
osbuildJobResult.JobError = clienterrors.WorkerClientError(clienterrors.ErrorBuildJob, "Error getting osbuild binary version", err)
osbuildJobResult.JobError = clienterrors.WorkerClientError(clienterrors.ErrorBuildJob, "Error getting osbuild binary version", err.Error())
return err
}
osbuildJobResult.OSBuildVersion = osbuildVersion
Expand Down Expand Up @@ -516,7 +516,7 @@ func (impl *OSBuildJobImpl) Run(job worker.Job) error {
osbuildJobResult.OSBuildOutput, err = executor.RunOSBuild(jobArgs.Manifest, impl.Store, outputDirectory, exports, exportPaths, nil, extraEnv, true, os.Stderr)
// First handle the case when "running" osbuild failed
if err != nil {
osbuildJobResult.JobError = clienterrors.WorkerClientError(clienterrors.ErrorBuildJob, "osbuild build failed", err)
osbuildJobResult.JobError = clienterrors.WorkerClientError(clienterrors.ErrorBuildJob, "osbuild build failed", err.Error())
return err
}

Expand Down

0 comments on commit 85feb6c

Please sign in to comment.