Raising errors in _setup_server results in a bad server state.
Open
Nobody has claimed this yet.
bug
P3
- Dominant language
- Python
- Stars
- 24.4k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 13
Description
If an error is raised in a before_first_request handler, the server will retry it for every requests resulting in 500 errors.
The server should stop if an error happens by calling the werkzeug stopper function from the request context.
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 at the _setup_server path and the before_first_request handler behavior described in the issue, then inspect how the request context exposes the Werkzeug stopper. Reproduce a handler error and verify that the server stops instead of retrying the handler for every request; the linked pytest-dash issue provides additional context.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- flask, python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100