diff options
| author | Paul Melnikow | 2014-01-31 12:26:45 -0500 |
|---|---|---|
| committer | Paul Melnikow | 2014-01-31 12:26:45 -0500 |
| commit | 77ced39e6c02cd375ac6df0c00f78846ac5cbec5 (patch) | |
| tree | a5458f109790c219179bb7afd34b01c9ae3f6eec /docs/api-guide | |
| parent | 2921455ea729a6dffe969918b46fd735920d17aa (diff) | |
| download | django-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/api-guide')
| -rw-r--r-- | docs/api-guide/exceptions.md | 2 |
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 |
