diff --git a/front/src/Connexion/ConnectionManager.ts b/front/src/Connexion/ConnectionManager.ts index b12e541a..7dbbb190 100644 --- a/front/src/Connexion/ConnectionManager.ts +++ b/front/src/Connexion/ConnectionManager.ts @@ -169,6 +169,9 @@ class ConnectionManager { } } catch (err) { console.error(err); + if (err instanceof Error) { + console.error(err.stack); + } } } else { const query = urlParams.toString(); diff --git a/front/src/Connexion/LocalUserStore.ts b/front/src/Connexion/LocalUserStore.ts index 27ccbc23..bc3b1886 100644 --- a/front/src/Connexion/LocalUserStore.ts +++ b/front/src/Connexion/LocalUserStore.ts @@ -139,9 +139,13 @@ class LocalUserStore { async setLastRoomUrl(roomUrl: string): Promise { localStorage.setItem(lastRoomUrl, roomUrl.toString()); if ("caches" in window) { - const cache = await caches.open(cacheAPIIndex); - const stringResponse = new Response(JSON.stringify({ roomUrl })); - await cache.put(`/${lastRoomUrl}`, stringResponse); + try { + const cache = await caches.open(cacheAPIIndex); + const stringResponse = new Response(JSON.stringify({ roomUrl })); + await cache.put(`/${lastRoomUrl}`, stringResponse); + } catch (e) { + console.error("Could not store last room url in Browser cache. Are you using private browser mode?", e); + } } } getLastRoomUrl(): string { diff --git a/front/src/Phaser/Reconnecting/ErrorScene.ts b/front/src/Phaser/Reconnecting/ErrorScene.ts index 078bee71..ea593c45 100644 --- a/front/src/Phaser/Reconnecting/ErrorScene.ts +++ b/front/src/Phaser/Reconnecting/ErrorScene.ts @@ -78,6 +78,9 @@ export class ErrorScene extends Phaser.Scene { */ public static showError(error: unknown, scene: ScenePlugin): void { console.error(error); + if (error instanceof Error) { + console.error("Stacktrace: ", error.stack); + } console.trace(); if (typeof error === "string" || error instanceof String) {