MCPcopy Create free account
hub / github.com/Noumena-Network/code / isGoogleAuthLibraryCredentialError

Function isGoogleAuthLibraryCredentialError

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

Source from the content-addressed store, hash-verified

701// google-auth-library throws plain Error (no typed name like AWS's
702// CredentialsProviderError). Match common SDK-level credential-failure messages.
703function isGoogleAuthLibraryCredentialError(error: unknown): boolean {
704 if (!(error instanceof Error)) return false
705 const msg = error.message
706 return (
707 msg.includes('Could not load the default credentials') ||
708 msg.includes('Could not refresh access token') ||
709 msg.includes('invalid_grant')
710 )
711}
712
713function isVertexAuthError(error: unknown): boolean {
714 if (isEnvTruthy(process.env.CLAUDE_CODE_USE_VERTEX)) {

Callers 1

isVertexAuthErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected