-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Interactions: Show exceptions by non-instrumented code in panel #16592
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 9be5035. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we are missing tests here:
- Does the
Panel
have tests? - We definitely should have a story that shows this new
Exception
component. - Can we add a
PreviewWeb
test for the case that the play function throws? Or is this already covered?
@tmeasday @ghengeveld what do we need to do to get this over the line? |
Hey @ghengeveld, given the stuff you did in the other PRs, is this something we should work on still? |
I totally forgot about this one. I guess it would've been an alternative to adding any interactions that have an exception to the log. That is a nicer solution though so we don't need this PR for that purpose anymore. However there's also things which aren't instrumented that might throw an error. This PR does address those things, and I think it's much nicer to show those in the Interactions panel rather than a redbox. |
Still needs some tests for the Panel and possibly PreviewWeb. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good with these changes as is, but have some suggestions for improvement maybe.
…inate from the play function
bec8830
to
9be5035
Compare
@shilman This is ready to merge. |
@ghengeveld @yannbf @tmeasday This is actually a breaking change, as we've seen today with the chromatic issue on PR #18894 and probably deserves its own entry in |
Issue: #16585
What I did
Catch exceptions thrown in the play function so they don't trigger a redbox.
Log them to console and emit an event if this happens and pick it up in the Interactions addon.
Show the error in the addon panel (see screenshot).
Fixed serialization of error payload in
STORY_THREW_EXCEPTION
event.How to test
If your answer is yes to any of these, please make sure to include it in your PR.