MCPcopy Create free account
hub / github.com/IIIIQIIII/claude-code / isGoogleAuthLibraryCredentialError

Function isGoogleAuthLibraryCredentialError

src/services/api/withRetry.ts:656–664  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

654// google-auth-library throws plain Error (no typed name like AWS's
655// CredentialsProviderError). Match common SDK-level credential-failure messages.
656function isGoogleAuthLibraryCredentialError(error: unknown): boolean {
657 if (!(error instanceof Error)) return false
658 const msg = error.message
659 return (
660 msg.includes('Could not load the default credentials') ||
661 msg.includes('Could not refresh access token') ||
662 msg.includes('invalid_grant')
663 )
664}
665
666function isVertexAuthError(error: unknown): boolean {
667 if (isEnvTruthy(process.env.CLAUDE_CODE_USE_VERTEX)) {

Callers 1

isVertexAuthErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected