aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide/exceptions.md
diff options
context:
space:
mode:
authorTom Christie2014-12-15 09:19:53 +0000
committerTom Christie2014-12-15 09:19:53 +0000
commitd232c5739e13da1c3e0461c79e9e124f576f1c05 (patch)
treebb977c3dfb0c92f044889ee3c8454630a8b91dd5 /docs/api-guide/exceptions.md
parent4778463e32550f3bf9aa350925b1260343bced99 (diff)
parent4ebd8770b94ecb8fe8fb41fe8daa4309b33b9952 (diff)
downloaddjango-rest-framework-d232c5739e13da1c3e0461c79e9e124f576f1c05.tar.bz2
Merge branch 'exception-handler-context' of git://github.com/jpadilla/django-rest-framework into version-3.1
Diffstat (limited to 'docs/api-guide/exceptions.md')
-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 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: