title: Django-rest-framework: return Response from .dispatch
body: <p>I am doing a (more-or-less) custom authentication in a <code>django-rest-framework</code>-based application, where I just need to call another microservice to ask it if a token is valid and what username/userid are associated with it. (I don't have a local table for users).</p>
  
  <p>Having found no out-of-the-box solution, I am overriding the <code>dispatch</code> method (I am using a <code>APIView</code>-based view), where I make the request to the remote service and, if the response is not 200, I want to return a 403 error.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>def dispatch(self, request, *args, **kwargs):
      try:
          user_info = user_from_token_in_request(request)
          return super().dispatch(*args, **kwargs)
      except:
          return Response(
              "No Auth Token provided or bad Auth Token"
              status.HTTP_403_FORBIDDEN,
          )
  </code></pre>
  
  <p>However, when I pass an invalid token, I get this error: <code>AssertionError: .accepted_renderer not set on Response</code>, because the response context is not initialised when the <code>dispatch</code> method is processed. </p>
  
  <p>Is there a, sort of, more proper way of doing it?</p>