I'm experiencing some pretty weird behaviour.

I have an exception_handler method that's supposed to return a 
django.http.HttpResponse when an exception is raised within a 
views.APIView. However, when the exception response is sent, the browser 
doesn't actually receive any response. The error is "Could not get any 
response" or "ERR_CONNECTION_RESET". 

The weird thing is, when I set a breakpoint at line 466 within 
rest_framework/views.py

response = self.handle_exception(exc)

the exception response is sent properly! Any breakpoints set earlier than 
that, and it won't work. Any breakpoints after, and it works.

Any idea what's going on here? Django is trying to send the response before 
it's ready? I have no idea.

-- 
You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to