aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide/exceptions.md
diff options
context:
space:
mode:
authorTom Christie2013-01-26 21:37:43 +0000
committerTom Christie2013-01-26 21:37:43 +0000
commitb5d8f50f9dcace3ad3c708ed518f23ff260f6bea (patch)
tree7a0fb931ad5841b863359719075dd55f8370b3a1 /docs/api-guide/exceptions.md
parent4eb5861f3676781493af29f8e9fd87ec22e591aa (diff)
parenta75db4cfb8ed756c451bfda7ea0c73a73859216f (diff)
downloaddjango-rest-framework-b5d8f50f9dcace3ad3c708ed518f23ff260f6bea.tar.bz2
Merge branch 'master' into many-fields
Diffstat (limited to 'docs/api-guide/exceptions.md')
-rw-r--r--docs/api-guide/exceptions.md19
1 files changed, 18 insertions, 1 deletions
diff --git a/docs/api-guide/exceptions.md b/docs/api-guide/exceptions.md
index ba57fde8..8b3e50f1 100644
--- a/docs/api-guide/exceptions.md
+++ b/docs/api-guide/exceptions.md
@@ -53,11 +53,27 @@ 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".
+## AuthenticationFailed
+
+**Signature:** `AuthenticationFailed(detail=None)`
+
+Raised when an incoming request includes incorrect authentication.
+
+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.
+
+## NotAuthenticated
+
+**Signature:** `NotAuthenticated(detail=None)`
+
+Raised when an unauthenticated 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 request fails the permission checks.
By default this exception results in a response with the HTTP status code "403 Forbidden".
@@ -86,3 +102,4 @@ 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
+[authentication]: authentication.md