diff options
| author | Tom Christie | 2012-10-17 14:59:37 +0100 | 
|---|---|---|
| committer | Tom Christie | 2012-10-17 14:59:37 +0100 | 
| commit | 4c17d1441f184eabea9000155f07445bcc2aa14c (patch) | |
| tree | 4aa8219aefab33f02cd8e5dd97a0fbd6f8bfc76b /docs | |
| parent | bd8360c826b7a922eeb6226beb17853cfadb466c (diff) | |
| download | django-rest-framework-4c17d1441f184eabea9000155f07445bcc2aa14c.tar.bz2 | |
Add `Unauthenticated` exception.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/api-guide/exceptions.md | 13 | 
1 files changed, 11 insertions, 2 deletions
| diff --git a/docs/api-guide/exceptions.md b/docs/api-guide/exceptions.md index c3bdb7b9..f5dff94a 100644 --- a/docs/api-guide/exceptions.md +++ b/docs/api-guide/exceptions.md @@ -49,11 +49,19 @@ Raised if the request contains malformed data when accessing `request.DATA` or `  By default this exception results in a response with the HTTP status code "400 Bad Request". +## Unauthenticated + +**Signature:** `Unauthenticated(detail=None)` + +Raised when an unauthenticated incoming request fails the permission checks. + +By default this exception results in a response with the HTTP status code "401 Unauthenticated", but it may also result in a "403 Forbidden" response, depending on the authentication scheme in use.  See the [authentication documentation][authentication] for more details. +  ## PermissionDenied  **Signature:** `PermissionDenied(detail=None)` -Raised when an incoming request fails the permission checks. +Raised when an authenticated incoming request fails the permission checks.  By default this exception results in a response with the HTTP status code "403 Forbidden". @@ -81,4 +89,5 @@ Raised when an incoming request fails the throttling checks.  By default this exception results in a response with the HTTP status code "429 Too Many Requests". -[cite]: http://www.doughellmann.com/articles/how-tos/python-exception-handling/index.html
\ No newline at end of file +[cite]: http://www.doughellmann.com/articles/how-tos/python-exception-handling/index.html +[authentication]: authentication.md
\ No newline at end of file | 
