diff options
| author | Tom Christie | 2014-12-15 09:13:27 +0000 |
|---|---|---|
| committer | Tom Christie | 2014-12-15 09:13:27 +0000 |
| commit | d22c0007b3ec9e4d7105afc4f7a2cb9a89c0f97b (patch) | |
| tree | 92d03caaba239a638395a5a76a8317193688382f /docs/api-guide | |
| parent | 5e7c9687c7e11b6adfe2fc534eb0504e67ca9fc9 (diff) | |
| parent | 4ebd8770b94ecb8fe8fb41fe8daa4309b33b9952 (diff) | |
| download | django-rest-framework-d22c0007b3ec9e4d7105afc4f7a2cb9a89c0f97b.tar.bz2 | |
Merge branch 'exception-handler-context' of git://github.com/jpadilla/django-rest-framework into jpadilla-exception-handler-context
Diffstat (limited to 'docs/api-guide')
| -rw-r--r-- | docs/api-guide/exceptions.md | 4 | ||||
| -rw-r--r-- | docs/api-guide/settings.md | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/docs/api-guide/exceptions.md b/docs/api-guide/exceptions.md index 467ad970..31a8431b 100644 --- a/docs/api-guide/exceptions.md +++ b/docs/api-guide/exceptions.md @@ -51,10 +51,10 @@ In order to alter the style of the response, you could write the following custo from rest_framework.views import exception_handler - def custom_exception_handler(exc): + def custom_exception_handler(exc, context): # Call REST framework's default exception handler first, # to get the standard error response. - response = exception_handler(exc) + response = exception_handler(exc, context) # Now add the HTTP status code to the response. if response is not None: diff --git a/docs/api-guide/settings.md b/docs/api-guide/settings.md index 9005511b..2c4f8423 100644 --- a/docs/api-guide/settings.md +++ b/docs/api-guide/settings.md @@ -393,7 +393,7 @@ This setting can be changed to support error responses other than the default `{ This should be a function with the following signature: - exception_handler(exc) + exception_handler(exc, context) * `exc`: The exception. |
