diff --git a/engage/utils/middleware.py b/engage/utils/middleware.py index 82c5e1c0a..8bdd74849 100644 --- a/engage/utils/middleware.py +++ b/engage/utils/middleware.py @@ -12,8 +12,11 @@ def __init__(self, get_response): def __call__(self, request): response = self.get_response(request) return response - + def process_exception(self, request, exception): + if isinstance(exception, RedirectTo): + return None + self.logger.exception(str(exception)) return HttpResponseServerError("A server error has occurred and IT has been notified. Please retry your request.")