mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-21 02:24:09 -07:00
feat: attempt more error parsing (#14899)
This commit is contained in:
@@ -94,7 +94,12 @@ describe('parseGoogleApiError', () => {
|
||||
},
|
||||
},
|
||||
};
|
||||
expect(parseGoogleApiError(mockError)).toBeNull();
|
||||
|
||||
expect(parseGoogleApiError(mockError)).toEqual({
|
||||
code: 400,
|
||||
message: 'Bad Request',
|
||||
details: [],
|
||||
});
|
||||
});
|
||||
|
||||
it('should return null if there are no valid details', () => {
|
||||
@@ -115,7 +120,11 @@ describe('parseGoogleApiError', () => {
|
||||
},
|
||||
},
|
||||
};
|
||||
expect(parseGoogleApiError(mockError)).toBeNull();
|
||||
expect(parseGoogleApiError(mockError)).toEqual({
|
||||
code: 400,
|
||||
message: 'Bad Request',
|
||||
details: [],
|
||||
});
|
||||
});
|
||||
|
||||
it('should parse a doubly nested error in the message', () => {
|
||||
|
||||
Reference in New Issue
Block a user