Allow to pass errors through in `Quart.run` as in `Flask.run` (via `passthrough_errors=True`)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.7k
- Forks
- 206
- PR merge metrics
- No merged PRs in 30d
Description
It would be great if Quart.run was able to pass through errors at the server level and let the server crash. This option would be super useful in debugging and improve the developer experience since a lot of debuggers (e.g., in VS Code or PyCharm) allow debugging unhandled exceptions automatically without setting breakpoints. Currently, all exceptions are handled at the server level so they won't bubble up to the debugger.
Flask.run allows doing that when setting passthrough_errors=True (together with use_debugger=False), which is further passed to werkzeug.serving.run_simple (https://werkzeug.palletsprojects.com/en/3.0.x/serving/#werkzeug.serving.run_simple).
Since Quart is using Hypercorn it would probably require changes to both Quart and Hypercorn.
Quart itself allows errors to be passed through on the app level via the PROPAGATE_EXCEPTIONS config, but not on the server level.
Thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing Quart.run with Flask.run and tracing how Hypercorn handles server-level exceptions. Define the option's interaction with use_debugger and PROPAGATE_EXCEPTIONS, then verify that unhandled errors reach a debugger or terminate the server as requested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100