plotly / plotly/dash

Raising errors in _setup_server results in a bad server state.

Open
#568 0 comments 0 reactions 0 assignees View on GitHub

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.

https://github.com/T4rk1n/pytest-dash/issues/57

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.