Commits

Matthew Schinckel committed fc6e2d6

Set response.request when we caught an error.

Comments (0)

Files changed (1)

             response = super(ApiView, self).dispatch(request, *args, **kwargs)
         except http.BaseHttpResponse, response:
             # This sets the variable `response` to be the object that was raised, if it was a subclass of http.BaseHttpResponse. This enables us to throw a response from arbitrarily deep in the stack.
+            response.request = request
             try:
                 response._container.update_from_request(request)
             except AttributeError: