worker: clarify 404 error message
When a token doesn't exist, the URL is invalid. Nothing to do with a job.
This commit is contained in:
parent
ca35f25fcf
commit
85423d403c
1 changed files with 2 additions and 2 deletions
|
|
@ -279,7 +279,7 @@ func (h *apiHandlers) GetJob(ctx echo.Context, tokenstr string) error {
|
|||
if err != nil {
|
||||
switch err {
|
||||
case ErrTokenNotExist:
|
||||
return echo.NewHTTPError(http.StatusNotFound, "job is not running")
|
||||
return echo.NewHTTPError(http.StatusNotFound, "not found")
|
||||
default:
|
||||
return err
|
||||
}
|
||||
|
|
@ -322,7 +322,7 @@ func (h *apiHandlers) UpdateJob(ctx echo.Context, idstr string) error {
|
|||
if err != nil {
|
||||
switch err {
|
||||
case ErrTokenNotExist:
|
||||
return echo.NewHTTPError(http.StatusNotFound, "job does not exist")
|
||||
return echo.NewHTTPError(http.StatusNotFound, "not found")
|
||||
default:
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue