aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorPaul Melnikow2014-01-31 12:26:45 -0500
committerPaul Melnikow2014-01-31 12:26:45 -0500
commit77ced39e6c02cd375ac6df0c00f78846ac5cbec5 (patch)
treea5458f109790c219179bb7afd34b01c9ae3f6eec /docs
parent2921455ea729a6dffe969918b46fd735920d17aa (diff)
downloaddjango-rest-framework-77ced39e6c02cd375ac6df0c00f78846ac5cbec5.tar.bz2
Fix doc for custom exception sample
The way to provide a default detail for APIException is to define a `default_detail` attribute on the subclass. Defining a `detail` attribute without `default_detail` will not work, and will result in empty detail instead.
Diffstat (limited to 'docs')
-rw-r--r--docs/api-guide/exceptions.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/api-guide/exceptions.md b/docs/api-guide/exceptions.md
index 221df679..4e8b823c 100644
--- a/docs/api-guide/exceptions.md
+++ b/docs/api-guide/exceptions.md
@@ -94,7 +94,7 @@ For example, if your API relies on a third party service that may sometimes be u
class ServiceUnavailable(APIException):
status_code = 503
- detail = 'Service temporarily unavailable, try again later.'
+ default_detail = 'Service temporarily unavailable, try again later.'
## ParseError