I tried out the generic HTTPException handler described in:
https://flask.palletsprojects.com/en/1.1.x/errorhandling/#generic-exception-handlers
this handler calls get_response() without parameter on the error, but it breaks on a RequestRedirect as the environ parameter is required.
Is there a reason why RequestRedirect does not conform to the HTTPException signature for get_response ?
I think
def get_response(self, environ):
return redirect(self.new_url, self.code)
should be replaced by
def get_response(self, environ=None):
return redirect(self.new_url, self.code)