(this is from some investigations on last night's production bug)
It looks like DRF only re-raises an exception when its handler returns None.
Our custom_exception_handler returns a 500 for non-API exceptions instead,
so the exception never propagates out of the view. When that happens, the
transaction is committed.
I believe we should rollback instead.
┆Issue is synchronized with this Jira Task
(this is from some investigations on last night's production bug)
It looks like DRF only re-raises an exception when its handler returns
None.Our
custom_exception_handlerreturns a 500 for non-API exceptions instead,so the exception never propagates out of the view. When that happens, the
transaction is committed.
I believe we should rollback instead.
┆Issue is synchronized with this Jira Task