Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Allow component developers to expose custom errors / warnings in Dash Devtools #1088

Closed
Marc-Andre-Rivet opened this issue Jan 15, 2020 · 2 comments
Assignees
Labels
feature something new
Milestone

Comments

@Marc-Andre-Rivet
Copy link
Contributor

As encountered in plotly/dash-core-components#729, it would be useful for component developers to expose degradation warnings / errors, etc. in Dash Devtools.

As currently implemented, only front-end errors thrown from within the React Error Boundary components are caught / handled by the Dash Devtools, making it impossible to both expose warning / error information to the user and rendering a component at the same time.

@wbrgss
Copy link
Contributor

wbrgss commented Jan 15, 2020

I think I ran into that problem myself. If it helps (but basically echoing this issue description):

I would prefer to throw a warning and still render the [component], but I can't figure out a way to display a Dev Tools warning without throwing an exception, and any uncaught exceptions will result in the component failing to render. Any caught exceptions (even with React Error Boundaries & componentDidCatch()) won't show the warning in Dev Tools. As an escape hatch I added a suppress_layout_exceptions flag to [the parent component]

@T4rk1n
Copy link
Contributor

T4rk1n commented Jul 17, 2024

This has been implemented with set_props({_dash_error: new Error("custom")})

@T4rk1n T4rk1n closed this as completed Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new
Projects
None yet
Development

No branches or pull requests

4 participants