diff --git a/docs/api-guide/exceptions.md b/docs/api-guide/exceptions.md index 3e4b3e8be..a781ef0aa 100644 --- a/docs/api-guide/exceptions.md +++ b/docs/api-guide/exceptions.md @@ -61,10 +61,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, context): + def custom_exception_handler(exc, **context): # Call REST framework's default exception handler first, # to get the standard error response. - response = exception_handler(exc, context) + response = exception_handler(exc, **context) # Now add the HTTP status code to the response. if response is not None: