do not retry SyntaxErrors
This commit is contained in:
@@ -18,6 +18,7 @@ export function isRetryableError(e: unknown): boolean {
|
|||||||
if (e instanceof UnrecoverableError) return false;
|
if (e instanceof UnrecoverableError) return false;
|
||||||
if (e instanceof AbortError) return true;
|
if (e instanceof AbortError) return true;
|
||||||
if (e instanceof FetchError) return true;
|
if (e instanceof FetchError) return true;
|
||||||
|
if (e instanceof SyntaxError) return false;
|
||||||
if (e instanceof Error) return e.name === 'AbortError';
|
if (e instanceof Error) return e.name === 'AbortError';
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user