Skip to content

report errors that originate from LiveComponents #74

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

Merged
merged 2 commits into from
Aug 30, 2024

Conversation

numso
Copy link
Contributor

@numso numso commented Aug 29, 2024

fixes #73

Copy link
Contributor

@crbelaus crbelaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great 🚀

@crbelaus crbelaus merged commit 317432f into elixir-error-tracker:main Aug 30, 2024
3 checks passed
@numso numso deleted the add-live-component-events branch August 31, 2024 18:40
odarriba pushed a commit that referenced this pull request Sep 1, 2024
As @odarriba and @numso discussed on #74 the current approach of adding
LiveView event information to the process context may result in
misleading information for certain errors.

> For example, if the following happened:
> 
> 1. mount the liveview
> 2. handle_event("something", params, socket) in the liveview
> 3. handle_info("something_else", socket) causing a re-render
> 4. render -> exception occurs
>
> I think live_view.event and live_view.event_params would still be in
the error context when the exception was reported. They would have been
assigned to context in step 2. But by step 4, that data could be
irrelevant. Am I understanding that right?

This pull request adds the LiveView event information to the context
only during exceptions and avoids the situations mentioned above. The
LiveView name, URL and URL params are still part of the process context
as that information is helpful to understand what was going on before
the error happened.

This is consistent with the LiveComponent error handled implemented in
#74
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing exceptions raised in LiveComponents
3 participants