Skip to content

Commit

Permalink
Merge pull request #362 from istresearch/PE-426
Browse files Browse the repository at this point in the history
Adjust exception handler to ignore RedirectTo exception
  • Loading branch information
jeremyist authored Aug 12, 2024
2 parents 36c9c45 + f9daf34 commit cd9d934
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion engage/utils/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")

Expand Down

0 comments on commit cd9d934

Please sign in to comment.