mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 08:47:44 +00:00
feat(cli): improve API error parsing and display (#829)
This commit is contained in:
@@ -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,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user