diegosouzapw/OmniRoute · error · ClaudeAuthFileError
refresh_failed
refresh_failed
Error message
Failed to refresh the Claude session before exporting the credentials file. Re-authenticate this account if the session is stale.
What it means
Error "Failed to refresh the Claude session before exporting the credentials file. Re-authenticate this account if the session is stale." thrown in diegosouzapw/OmniRoute.
Source
Thrown at src/lib/oauth/utils/claudeAuthFile.ts:219
const refreshed = await getAccessToken("claude", {
connectionId,
accessToken: connection.accessToken,
refreshToken,
expiresAt: connection.expiresAt,
expiresIn: connection.expiresIn,
providerSpecificData: connection.providerSpecificData,
});
if (isUnrecoverableRefreshError(refreshed)) {
throw new ClaudeAuthFileError(
"Claude refresh token is no longer valid. Re-authenticate this account before exporting.",
409,
"reauth_required"
);
}
if (!refreshed?.accessToken) {
throw new ClaudeAuthFileError(
"Failed to refresh the Claude session before exporting the credentials file. Re-authenticate this account if the session is stale.",
502,
"refresh_failed"
);
}
await updateProviderCredentials(connectionId, refreshed);
return {
...connection,
accessToken: refreshed.accessToken,
refreshToken: toNonEmptyString(refreshed.refreshToken) || refreshToken,
expiresIn:
typeof refreshed.expiresIn === "number" ? refreshed.expiresIn : connection.expiresIn || null,
expiresAt:
typeof refreshed.expiresIn === "number"
? new Date(Date.now() + refreshed.expiresIn * 1000).toISOString()
: connection.expiresAt || null,View on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at src/lib/oauth/utils/claudeAuthFile.ts:219 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Authentication and authorization failures — expired tokens, bad credentials, and missing scopes.
AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25).
Data as JSON: /api/errors/0abce2df9bfec81d.
Report an issue: GitHub.