diff options
| author | Scott Densmore <[email protected]> | 2025-06-07 22:04:57 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-06-07 22:04:57 -0700 |
| commit | b46f22093145760eaf8cefafd0050597bfb44249 (patch) | |
| tree | eeb3eb26e2289c1d5feef272745c105a2dbfca93 /packages/cli/src/ui/hooks/useGeminiStream.ts | |
| parent | 6e4b84a60d0f94ba772b9872385d1c4021090786 (diff) | |
feat(cli): improve API error parsing and display (#829)
Diffstat (limited to 'packages/cli/src/ui/hooks/useGeminiStream.ts')
| -rw-r--r-- | packages/cli/src/ui/hooks/useGeminiStream.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/cli/src/ui/hooks/useGeminiStream.ts b/packages/cli/src/ui/hooks/useGeminiStream.ts index caf82a47..5e741547 100644 --- a/packages/cli/src/ui/hooks/useGeminiStream.ts +++ b/packages/cli/src/ui/hooks/useGeminiStream.ts @@ -28,6 +28,7 @@ import { ToolCallStatus, } from '../types.js'; import { isAtCommand } from '../utils/commandUtils.js'; +import { parseAndFormatApiError } from '../utils/errorParsing.js'; import { useShellCommandProcessor } from './shellCommandProcessor.js'; import { handleAtCommand } from './atCommandProcessor.js'; import { findLastSafeSplitPoint } from '../utils/markdownUtilities.js'; @@ -467,7 +468,9 @@ export const useGeminiStream = ( addItem( { type: MessageType.ERROR, - text: `[Stream Error: ${getErrorMessage(error) || 'Unknown error'}]`, + text: parseAndFormatApiError( + getErrorMessage(error) || 'Unknown error', + ), }, userMessageTimestamp, ); |
