osbuild-worker: correctly pass ostree error details
Passing an error as details results in the details being empty after marshaling. Pass the string formatted error instead.
This commit is contained in:
parent
401a59b6e4
commit
7ae79e7786
1 changed files with 3 additions and 3 deletions
|
|
@ -19,19 +19,19 @@ func setError(err error, result *worker.OSTreeResolveJobResult) {
|
|||
result.JobError = clienterrors.WorkerClientError(
|
||||
clienterrors.ErrorOSTreeRefInvalid,
|
||||
"Invalid OSTree ref",
|
||||
err,
|
||||
err.Error(),
|
||||
)
|
||||
case ostree.ResolveRefError:
|
||||
result.JobError = clienterrors.WorkerClientError(
|
||||
clienterrors.ErrorOSTreeRefResolution,
|
||||
"Error resolving OSTree ref",
|
||||
err,
|
||||
err.Error(),
|
||||
)
|
||||
default:
|
||||
result.JobError = clienterrors.WorkerClientError(
|
||||
clienterrors.ErrorOSTreeParamsInvalid,
|
||||
"Invalid OSTree parameters or parameter combination",
|
||||
err,
|
||||
err.Error(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue