          return formatting.markup_description(description)
      return description
  
  
  def exception_handler(exc):
      """
      Returns the response that should be used for any given exception.
  
      By default we handle the REST framework `APIException`, and also
      Django's built-in `ValidationError`, `Http404` and `PermissionDenied`
 
</s> remove         def exception_handler(exc):
 </s> add         def exception_handler(exc, context=None):
            self.assertTrue('args' in context)
            self.assertTrue('kwargs' in context)
            self.assertTrue('request' in context)
            self.assertTrue('view' in context)
 </s> remove         response = self.settings.EXCEPTION_HANDLER(exc)
 </s> add         context = self.get_renderer_context()
        response = self.settings.EXCEPTION_HANDLER(exc, context)
def exception_handler(exc, context=None):
          return formatting.markup_description(description)
      return description
  
  
def exception_handler(exc, context=None):
      """
      Returns the response that should be used for any given exception.
  
      By default we handle the REST framework `APIException`, and also
      Django's built-in `ValidationError`, `Http404` and `PermissionDenied`
keep keep keep keep replace keep keep keep keep keep
 Add context to exception handler #2236

Same context as renderers which include: the view,
args, kwargs, and request.

This provides enough contextual information to the
exception handlers to handle errors better.

In a use case like #1671, a custom handler
would allow Sentry to log the request properly. 
rest_framework/views.py