quart icon indicating copy to clipboard operation
quart copied to clipboard

Exception propagation via `PROPAGATE_EXCEPTIONS` config setting does not work

Open jakubsvehla opened this issue 1 year ago • 0 comments

When setting the PROPAGATE_EXCEPTIONS config variable to True, the ASGI app does not propagate the exceptions but instead returns the traceback as HTML. The expected behavior is to propagate the exception so that, for example, debuggers can handle it. The propagation works when setting the testing flag to True.

Below is the minimal reproducible example:

from quart import Quart

app = Quart(__name__)
app.config["PROPAGATE_EXCEPTIONS"] = True


@app.route("/")
def bug():
    1 / 0

Environment:

  • Python version: 3.12
  • Quart version: 0.19.8

jakubsvehla avatar Nov 15 '24 20:11 jakubsvehla