MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / isAuthenticationError

Function isAuthenticationError

cli/src/hooks/use-auth-query.ts:53–56  ·  view source on GitHub ↗

* Check if an error is an authentication error (401, 403)

(error: unknown)

Source from the content-addressed store, hash-verified

51 * Check if an error is an authentication error (401, 403)
52 */
53function isAuthenticationError(error: unknown): boolean {
54 const statusCode = getErrorStatusCode(error)
55 return statusCode === 401 || statusCode === 403
56}
57
58/**
59 * Validates an API key by calling the backend

Callers 2

validateApiKeyFunction · 0.70
useAuthQueryFunction · 0.70

Calls 1

getErrorStatusCodeFunction · 0.90

Tested by

no test coverage detected