Log error statuses from failed resume session calls (#4174)
* Add log to track how resume fails * Use safe field name * Better log * Properly catchzio/stable
parent
e5fc0baa6a
commit
6d647551cd
|
@ -53,7 +53,17 @@ export async function createAgentAndResume(
|
||||||
agent.session = prevSession
|
agent.session = prevSession
|
||||||
if (!storedAccount.deactivated) {
|
if (!storedAccount.deactivated) {
|
||||||
// Intentionally not awaited to unblock the UI:
|
// 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
|
||||||
|
},
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue