Changes between Initial Version and Version 1 of Ticket #30858


Ignore:
Timestamp:
Oct 8, 2019, 2:32:52 PM (5 years ago)
Author:
ForgottenLords
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #30858 – Description

    initial v1  
    99''Whenever your code raises an unhandled exception, or your view returns a response with a status code 500''
    1010
    11 The nuance is perhaps small, but we had been operating under the assumption that views returning a response with status_code=500 would be 'silent' and not generate emails as they are internal server errors, but have already been correctly and safely handled by our code but we still want to send the client a 500 to inform them that the response could not be completed as expected.  We assumed based on that line that emails would ONLY be sent as a result of unhandled exceptions.
     11The nuance is perhaps small, but we had been operating under the assumption that views returning a response with status_code=500 would be 'silent' and not generate emails as they are internal server errors, but have already been correctly and safely handled by our code yet we still want to send the client a 500 error to inform them that the response could not be completed as expected.  We assumed based on that line that emails would ONLY be sent as a result of unhandled exceptions.
    1212
    1313It may be worth expanding on the error handling to allow users to return 'safe' 500 responses that will not be logged, and in fact Django does check for the _has_been_logged property already before logging the response, which we can set in our code already so perhaps just exposing that to the documentation in a little note would be useful to people who want to send 500 responses without sending emails might be sufficient.
Back to Top