I think using a middleware is the nicest way to catch and deal with exceptions that arise from different places in the code. We already have this in place for the API: see APIErrorsMiddleware. The same pattern can be used for non-APi exceptions although in this case we could: issue a warning using Django's message framework and then reload the page.
I think using a middleware is the nicest way to catch and deal with exceptions that arise from different places in the code. We already have this in place for the API: see APIErrorsMiddle ware. The same pattern can be used for non-APi exceptions although in this case we could: issue a warning using Django's message framework and then reload the page.