Ocelot/docs/features/errorcodes.rst
Tom Pallister b74a1197a2
+semver: upgrade to net5.0 (#1390)
* breaking upgrade base build image to net5.0

* add make and build tools to image

* fix code broken after net5.0 upgrade

* fix warnings

* fix tests and line endings

* upgrade dotnet test and coverages packages

* update circle build image

* removed rafty and updated more packages

* bring back develop

* rename authorisation to authorization
2020-12-11 09:54:08 +00:00

14 lines
811 B
ReStructuredText

Http Error Status Codes
=======================
Ocelot will return HTTP status error codes based on internal logic in certain siturations:
- 401 if the authentication middleware runs and the user is not authenticated.
- 403 if the authorization middleware runs and the user is unauthenticated, claim value not authroised, scope not authorized, user doesnt have required claim or cannot find claim.
- 503 if the downstream request times out.
- 499 if the request is cancelled by the client.
- 404 if unable to find a downstream route.
- 502 if unable to connect to downstream service.
- 500 if unable to complete the HTTP request downstream and the exception is not OperationCanceledException or HttpRequestException.
- 404 if Ocelot is unable to map an internal error code to a HTTP status code.