summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'packages/cli/src/ui/hooks')
-rw-r--r--packages/cli/src/ui/hooks/useGeminiStream.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/cli/src/ui/hooks/useGeminiStream.ts b/packages/cli/src/ui/hooks/useGeminiStream.ts
index 921fbdb1..e045fdeb 100644
--- a/packages/cli/src/ui/hooks/useGeminiStream.ts
+++ b/packages/cli/src/ui/hooks/useGeminiStream.ts
@@ -396,7 +396,10 @@ export const useGeminiStream = (
setPendingHistoryItem(null);
}
addItem(
- { type: MessageType.ERROR, text: `[API Error: ${eventValue.message}]` },
+ {
+ type: MessageType.ERROR,
+ text: parseAndFormatApiError(eventValue.error),
+ },
userMessageTimestamp,
);
},
@@ -530,6 +533,10 @@ export const useGeminiStream = (
setPendingHistoryItem(null);
}
} catch (error: unknown) {
+ console.log(
+ 'GEMINI_DEBUG: Caught error in useGeminiStream.ts:',
+ JSON.stringify(error),
+ );
if (isAuthError(error)) {
onAuthError();
} else if (!isNodeError(error) || error.name !== 'AbortError') {