From 0122c6bee82da2197780b564f27d81ae512cb456 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Tue, 7 Oct 2025 18:30:06 +0530 Subject: [PATCH] try catch loadLastSession --- gui/src/redux/thunks/session.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gui/src/redux/thunks/session.ts b/gui/src/redux/thunks/session.ts index a4404095a..e89acb78f 100644 --- a/gui/src/redux/thunks/session.ts +++ b/gui/src/redux/thunks/session.ts @@ -159,7 +159,14 @@ export const loadLastSession = createAsyncThunk( return; } - const session = await getSession(extra.ideMessenger, lastSessionId); + let session: Session; + try { + session = await getSession(extra.ideMessenger, lastSessionId); + } catch { + // retry again after 1 sec + await new Promise((resolve) => setTimeout(resolve, 1000)); + session = await getSession(extra.ideMessenger, lastSessionId); + } dispatch(newSession(session)); }, );