We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3d860e1 commit de6c3c2Copy full SHA for de6c3c2
1 file changed
apps/modeling-commons-frontend/app/plugins/auth.ts
@@ -98,8 +98,14 @@ export default defineNuxtPlugin({
98
});
99
100
const session = await nuxtApp.runWithContext(() => authClient.useSession(useFetchHeaders));
101
- const refresh = () =>
102
- authClient.getSession({ fetchOptions: { headers, credentials: "include" } });
+
+ const refresh = () => {
103
+ try {
104
+ authClient.getSession({ fetchOptions: { headers, credentials: "include" } });
105
+ } catch (error) {
106
+ console.error("Failed to refresh session:", error);
107
+ }
108
+ };
109
110
return {
111
provide: {
0 commit comments