You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add LiveView event to context only during exceptions (#78)
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
0 commit comments