mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-28 05:55:17 -07:00
fix(ui): better error messages for ECONNRESET and ETIMEDOUT (#26059)
This commit is contained in:
@@ -140,6 +140,18 @@ describe('getFsErrorMessage', () => {
|
|||||||
expected:
|
expected:
|
||||||
'Too many open files in system. Close some unused files or applications.',
|
'Too many open files in system. Close some unused files or applications.',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
code: 'ECONNRESET',
|
||||||
|
message: 'ECONNRESET: connection reset by peer',
|
||||||
|
expected:
|
||||||
|
'Connection reset by peer. The network connection was unexpectedly closed.',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
code: 'ETIMEDOUT',
|
||||||
|
message: 'ETIMEDOUT: operation timed out',
|
||||||
|
expected:
|
||||||
|
'Operation timed out. The network connection or filesystem operation took too long.',
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
it.each(testCases)(
|
it.each(testCases)(
|
||||||
|
|||||||
@@ -48,6 +48,10 @@ const errorMessageGenerators: Record<string, (path?: string) => string> = {
|
|||||||
EMFILE: () => 'Too many open files. Close some unused files or applications.',
|
EMFILE: () => 'Too many open files. Close some unused files or applications.',
|
||||||
ENFILE: () =>
|
ENFILE: () =>
|
||||||
'Too many open files in system. Close some unused files or applications.',
|
'Too many open files in system. Close some unused files or applications.',
|
||||||
|
ECONNRESET: () =>
|
||||||
|
'Connection reset by peer. The network connection was unexpectedly closed.',
|
||||||
|
ETIMEDOUT: () =>
|
||||||
|
'Operation timed out. The network connection or filesystem operation took too long.',
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user