mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-23 20:40:41 -07:00
Disallow unsafe type assertions (#18688)
This commit is contained in:
committed by
GitHub
parent
bce1caefd0
commit
fd65416a2f
@@ -38,6 +38,7 @@ interface ErrorWithCode extends Error {
|
||||
* Extracts the appropriate error code from an error object.
|
||||
*/
|
||||
function extractErrorCode(error: unknown): string | number {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
||||
const errorWithCode = error as ErrorWithCode;
|
||||
|
||||
// Prioritize exitCode for FatalError types, fall back to other codes
|
||||
|
||||
Reference in New Issue
Block a user