mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-22 19:14:33 -07:00
move errorParsing.ts to core (#6159)
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
import { StructuredError } from '../core/turn.js';
|
||||
|
||||
export interface ApiError {
|
||||
error: {
|
||||
code: number;
|
||||
@@ -13,11 +15,6 @@ export interface ApiError {
|
||||
};
|
||||
}
|
||||
|
||||
interface StructuredError {
|
||||
message: string;
|
||||
status?: number;
|
||||
}
|
||||
|
||||
export function isApiError(error: unknown): error is ApiError {
|
||||
return (
|
||||
typeof error === 'object' &&
|
||||
|
||||
Reference in New Issue
Block a user