Skip to content

Commit

Permalink
internal errors are not bad requests
Browse files Browse the repository at this point in the history
  • Loading branch information
gulducat committed Mar 25, 2024
1 parent c3e083c commit 03fcc80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nomad/jobs_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,13 @@ func (j *Jobs) Statuses(
})
if err != nil {
return structs.NewErrRPCCodedf(
http.StatusBadRequest, "failed to create result paginator: %v", err)
http.StatusInternalServerError, "failed to create result paginator: %v", err)
}

nextToken, err := pager.Page()
if err != nil {
return structs.NewErrRPCCodedf(
http.StatusBadRequest, "failed to read result page: %v", err)
http.StatusInternalServerError, "failed to read result page: %v", err)
}

// if the page has updated, or a job has gone away,
Expand Down

0 comments on commit 03fcc80

Please sign in to comment.