mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-01 00:40:42 -07:00
feat(core): increase fetch timeout and fix [object Object] error stringification (#20441)
Co-authored-by: Gal Zahavi <38544478+galz10@users.noreply.github.com>
This commit is contained in:
@@ -29,6 +29,15 @@ export function getErrorMessage(error: unknown): string {
|
||||
if (friendlyError instanceof Error) {
|
||||
return friendlyError.message;
|
||||
}
|
||||
if (
|
||||
typeof friendlyError === 'object' &&
|
||||
friendlyError !== null &&
|
||||
'message' in friendlyError &&
|
||||
typeof (friendlyError as { message: unknown }).message === 'string'
|
||||
) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
||||
return (friendlyError as { message: string }).message;
|
||||
}
|
||||
try {
|
||||
return String(friendlyError);
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user