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
I'm working with supabase, and I find myself more often wanting to handle the errors thrown by fetcher on the client when for example supabase fails to refresh a token (to update the supabase's auth state on the client).
I tried adding event listeners to window as such in routes/+layout.svelte:
and I also tried adding the same listeners in hooks.client.ts which results in duplicating, as expected, the same effects as the one I setup on window in routes/+layout.svelte
Yet none of which seem to 'listen' for it. I do catch other events through the listeners, but never fetcher's errors.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm working with supabase, and I find myself more often wanting to handle the errors thrown by
fetcher
on the client when for example supabase fails to refresh a token (to update the supabase's auth state on the client).I tried adding event listeners to window as such in
routes/+layout.svelte
:and I also tried adding the same listeners in
hooks.client.ts
which results in duplicating, as expected, the same effects as the one I setup on window inroutes/+layout.svelte
Yet none of which seem to 'listen' for it. I do catch other events through the listeners, but never
fetcher
's errors.Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions