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
This appears to happen whenever someone tries to do somehthing but their session token is no longer valid. They get redirected to the login page on the front-end. How should we handle these in Elixir and Sentry?
FunctionClauseError: no function clause matching in Lightning.Projects.projects_for_user_query/1
File "lib/lightning/projects.ex", line 350, in Lightning.Projects.projects_for_user_query/1
File "lib/lightning/projects.ex", line 359, in Lightning.Projects.get_projects_for_user/1
File "lib/lightning_web/hooks.ex", line 23, in LightningWeb.Hooks.on_mount/4
File "lib/phoenix_live_view/lifecycle.ex", line 149, in anonymous fn/4 in Phoenix.LiveView.Lifecycle.mount/3
File "lib/phoenix_live_view/lifecycle.ex", line 212, in Phoenix.LiveView.Lifecycle.reduce_socket/3
...
(3 additional frame(s) were not displayed)
(FunctionClauseError no function clause matching in Lightning.Projects.projects_for_user_query/1)
The text was updated successfully, but these errors were encountered:
This is an interesting one, because the router does correctly redirect users that don't have a session anymore - but it seems like the socket is still connected or at least the "request" is a LiveView request.
In InitAssigns we assume the user is logged in; because "hey that's handled upstream". And I'm not convinced that we should handle redirection there either.
I think there is quite a bit we can improve with our routing/on_mount hooks here.
But for now I think it would be ok for us to redirect inside the :project_scope hook, if there is no current_user on the socket. I'd recommend pattern matching for it in a clause above the current one.
This appears to happen whenever someone tries to do somehthing but their session token is no longer valid. They get redirected to the login page on the front-end. How should we handle these in Elixir and Sentry?
Sentry Issue: LIGHTNING-1C
The text was updated successfully, but these errors were encountered: