This repository was archived by the owner on Oct 23, 2023. It is now read-only.
This repository was archived by the owner on Oct 23, 2023. It is now read-only.
flask wrap_wsgi should check propagate_exceptions instead of debug #1101
Open
Description
if wrap_wsgi is not None:
self.wrap_wsgi = wrap_wsgi
elif self.wrap_wsgi is None:
# Fix https://github.com/getsentry/raven-python/issues/412
# the gist is that we get errors twice in debug mode if we don't do this
if app and app.debug:
self.wrap_wsgi = False
else:
self.wrap_wsgi = True
I think this should actually check app.propagate_exceptions
because this is what determines whether an exception should be re-raised (and thus propagate to WSGI middleware). This property defaults to app.testing or app.debug
but if PROPAGATE_EXCEPTIONS
is set explicitly, it always uses that value.