kojiapi: Job not found should return 404
Not Found (404) is a more appropriate code for requesting a valid (correctly formatted) UUID that doesn't exist in the job queue.
This commit is contained in:
parent
9d3d4dcdea
commit
487299f09c
1 changed files with 1 additions and 1 deletions
|
|
@ -303,7 +303,7 @@ func (h *apiHandlers) GetComposeId(ctx echo.Context, idstr string) error {
|
|||
var finalizeResult worker.KojiFinalizeJobResult
|
||||
finalizeStatus, deps, err := h.server.workers.JobStatus(id, &finalizeResult)
|
||||
if err != nil {
|
||||
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Job %s not found: %s", idstr, err))
|
||||
return echo.NewHTTPError(http.StatusNotFound, fmt.Sprintf("Job %s not found: %s", idstr, err))
|
||||
}
|
||||
|
||||
// Make sure deps[0] matches a KojiInitJob
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue