Skip to content

Exception propagation via PROPAGATE_EXCEPTIONS config setting does not work #383

Open
@jakubsvehla

Description

@jakubsvehla

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions