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 committed Oct 8, 2020
1 parent 4f388c5 commit eea5d41
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,9 +9,9 @@ func httpStatus(code Code) int {
switch code {
case APIRouteNotFound, FilesRouteNotFound, RouteNotFound, SPARouteNotFound:
return http.StatusNotFound
case APIConnect:
case APIConnect, UpstreamResponseValidationFailed:
return http.StatusBadGateway
case InvalidRequest:
case InvalidRequest, UpstreamRequestValidationFailed:
return http.StatusBadRequest
case AuthorizationRequired, BasicAuthFailed:
return http.StatusUnauthorized
Expand Down

0 comments on commit eea5d41

Please sign in to comment.