Perf: improve reject build

This commit is contained in:
SukkaW
2023-12-10 02:12:53 +08:00
parent 2dc380dbf4
commit 2090d830da
3 changed files with 149 additions and 84 deletions

View File

@@ -82,7 +82,10 @@ function createFetchRetry($fetch: typeof fetch): typeof fetch {
}
} catch (err: unknown) {
if (err instanceof Error) {
if (err.name === 'AbortError') {
if (
err.name === 'AbortError'
|| ('digest' in err && err.digest === 'AbortError')
) {
console.log('[fetch abort]', url.toString());
return bail(err);
}