Move more error reporting to the front end
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 24.4k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 13
Description
In #1103 we move most callback validation to the front end, but not all, and there is other kinds of validation that still happens on the back end. This is a nicer experience for developers as (a) it doesn't halt the app, so if you introduced an error while editing a hot-reloading app you don't need to go restart it, and (b) you don't need to be looking in two places for errors.
There will always be some errors that halt the app, for example syntax errors (our code doesn't even run) or url errors (we wouldn't know where to send those!), but per https://github.com/plotly/dash/pull/1103#issuecomment-606772125 by @Marc-Andre-Rivet, there are other errors we could move to the front end: some remaining callback validation, layout validation (eg duplicate IDs)...
One idea for how to handle these is instead of raising in our code, we could save these errors to a queue that gets sent to the front end with one of the initialization requests (the layout request, for example). Perhaps also log them on the back end so that if the user is looking there they'll see it.
As a side note, perhaps the prod build of dash-renderer should omit this error handling. When it was on the back end, most of this only happened on server start but added no overhead once the app was running. On the front end it adds network and processing overhead every time the app is loaded.
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 reading PR #1103 and its linked discussion, then trace the layout and initialization requests and the remaining callback and layout validation paths. Done would require a decided scope for moving errors to the front end, including queueing and display, any back-end logging, and the production-build overhead tradeoff.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, react
- Domain
- backend, frontend, full-stack
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100