worker/clienterrors: add empty packagespec error
Add an error case for an empty package spec returned by a depsolve job and mark this with a `4xx` status.
This commit is contained in:
parent
5dffb9f59c
commit
14b006d480
2 changed files with 12 additions and 4 deletions
|
|
@ -283,6 +283,11 @@ func generateManifest(ctx context.Context, workers *worker.Server, depsolveJobID
|
|||
return
|
||||
}
|
||||
|
||||
if len(depsolveResults.PackageSpecs) == 0 {
|
||||
jobResult.JobError = clienterrors.WorkerClientError(clienterrors.ErrorEmptyPackageSpecs, "Received empty package specs")
|
||||
return
|
||||
}
|
||||
|
||||
manifest, err := imageType.Manifest(b, options, repos, depsolveResults.PackageSpecs, seed)
|
||||
if err != nil {
|
||||
reason := "Error generating manifest"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue