aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorHassan Shamim2014-02-10 12:54:56 -0600
committerHassan Shamim2014-02-10 12:54:56 -0600
commit97b7c25987c3bfa096a084dc671fc24816b08f87 (patch)
tree924d839c935f60ba92d7dd96cffa9487d2e4d4ca /docs
parent00b187710623d8efda62f207573fa4e356d1f8ef (diff)
downloaddjango-rest-framework-97b7c25987c3bfa096a084dc671fc24816b08f87.tar.bz2
Replace 'detail' with 'default_detail' in Exceptions guide and APIException class docstring.
Diffstat (limited to 'docs')
-rw-r--r--docs/api-guide/exceptions.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/api-guide/exceptions.md b/docs/api-guide/exceptions.md
index 4e8b823c..66e18173 100644
--- a/docs/api-guide/exceptions.md
+++ b/docs/api-guide/exceptions.md
@@ -18,7 +18,7 @@ The handled exceptions are:
In each case, REST framework will return a response with an appropriate status code and content-type. The body of the response will include any additional details regarding the nature of the error.
-By default all error responses will include a key `details` in the body of the response, but other keys may also be included.
+By default all error responses will include a key `detail` in the body of the response, but other keys may also be included.
For example, the following request:
@@ -86,7 +86,7 @@ Note that the exception handler will only be called for responses generated by r
The **base class** for all exceptions raised inside REST framework.
-To provide a custom exception, subclass `APIException` and set the `.status_code` and `.detail` properties on the class.
+To provide a custom exception, subclass `APIException` and set the `.status_code` and `.default_detail` properties on the class.
For example, if your API relies on a third party service that may sometimes be unreachable, you might want to implement an exception for the "503 Service Unavailable" HTTP response code. You could do this like so: