Skip to content

Commit

Permalink
chore: change error type to bad gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
IronCore864 committed Jan 23, 2025
1 parent 3f08cad commit 2a68ecc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internals/daemon/api_checks.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func v1PostChecksRun(c *Command, r *http.Request, _ *UserState) Response {
checkMgr := c.d.overlord.CheckManager()
err := checkMgr.RunCheck(r.Context(), check)
if err != nil {
return InternalError("%v", err)
return BadGateway("%v", err)
}

return SyncResponse(fmt.Sprintf("Check %q succeeded.", payload.Check))
Expand Down
1 change: 1 addition & 0 deletions internals/daemon/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,5 @@ var (
MethodNotAllowed = makeErrorResponder(http.StatusMethodNotAllowed)
InternalError = makeErrorResponder(http.StatusInternalServerError)
GatewayTimeout = makeErrorResponder(http.StatusGatewayTimeout)
BadGateway = makeErrorResponder(http.StatusBadGateway)
)

0 comments on commit 2a68ecc

Please sign in to comment.