summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/hooks/useGeminiStream.ts
diff options
context:
space:
mode:
authorTommaso Sciortino <[email protected]>2025-06-23 18:37:41 -0700
committerGitHub <[email protected]>2025-06-24 01:37:41 +0000
commit0abd2a644e947b7794dd68615d5d3d1553b0b5fd (patch)
tree66c694836649c2b9cec97acdab6a5ab429329618 /packages/cli/src/ui/hooks/useGeminiStream.ts
parent104f23da90f506c75ac9ec44cbe63dacf0f04dcf (diff)
Improve Auth error messaging (#1358)
Diffstat (limited to 'packages/cli/src/ui/hooks/useGeminiStream.ts')
-rw-r--r--packages/cli/src/ui/hooks/useGeminiStream.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/cli/src/ui/hooks/useGeminiStream.ts b/packages/cli/src/ui/hooks/useGeminiStream.ts
index e045fdeb..86540b68 100644
--- a/packages/cli/src/ui/hooks/useGeminiStream.ts
+++ b/packages/cli/src/ui/hooks/useGeminiStream.ts
@@ -22,7 +22,7 @@ import {
GitService,
EditorType,
ThoughtSummary,
- isAuthError,
+ UnauthorizedError,
UserPromptEvent,
} from '@gemini-cli/core';
import { type Part, type PartListUnion } from '@google/genai';
@@ -537,7 +537,7 @@ export const useGeminiStream = (
'GEMINI_DEBUG: Caught error in useGeminiStream.ts:',
JSON.stringify(error),
);
- if (isAuthError(error)) {
+ if (error instanceof UnauthorizedError) {
onAuthError();
} else if (!isNodeError(error) || error.name !== 'AbortError') {
addItem(