Skip to content

Commit

Permalink
invalid upstream request gets 400 - Bad Request; invalid upstream res…
Browse files Browse the repository at this point in the history
…ponse gets 502 - Bad Gateway (#21)
  • Loading branch information
Johannes Koch authored and Marcel Ludwig committed Dec 9, 2020
1 parent 0e9bc88 commit 5e5c373
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions errors/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ func httpStatus(code Code) int {
switch code {
case APIRouteNotFound, FilesRouteNotFound, RouteNotFound, SPARouteNotFound:
return http.StatusNotFound
case APIConnect:
case APIConnect, UpstreamResponseValidationFailed:
return http.StatusBadGateway
case APIReqBodySizeExceeded:
return http.StatusRequestEntityTooLarge
case InvalidRequest:
case InvalidRequest, UpstreamRequestValidationFailed:
return http.StatusBadRequest
case AuthorizationRequired, BasicAuthFailed:
return http.StatusUnauthorized
Expand Down

0 comments on commit 5e5c373

Please sign in to comment.