diff options
author | Eric Bailey <git@esb.lol> | 2024-05-23 13:27:53 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-23 19:27:53 +0100 |
commit | 6d647551cd2fcf9d66c3795df8f6764bf60f6df1 (patch) | |
tree | 03044ee07c203064b0b601a7ae78c7cd2e41002b /src/state/session | |
parent | e5fc0baa6ae1623abc1e8d6a50de00d3927248e2 (diff) | |
download | voidsky-6d647551cd2fcf9d66c3795df8f6764bf60f6df1.tar.zst |
Log error statuses from failed resume session calls (#4174)
* Add log to track how resume fails * Use safe field name * Better log * Properly catch
Diffstat (limited to 'src/state/session')
-rw-r--r-- | src/state/session/agent.ts | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/state/session/agent.ts b/src/state/session/agent.ts index 27e1af4c2..45013debc 100644 --- a/src/state/session/agent.ts +++ b/src/state/session/agent.ts @@ -53,7 +53,17 @@ export async function createAgentAndResume( agent.session = prevSession if (!storedAccount.deactivated) { // Intentionally not awaited to unblock the UI: - networkRetry(3, () => agent.resumeSession(prevSession)) + networkRetry(3, () => agent.resumeSession(prevSession)).catch( + (e: any) => { + logger.error(`networkRetry failed to resume session`, { + status: e?.status || 'unknown', + // this field name is ignored by Sentry scrubbers + safeMessage: e?.message || 'unknown', + }) + + throw e + }, + ) } } |