Skip to content

Commit fa0f6ca

Browse files
committed
Update fetch-retry.ts
1 parent 7b29d09 commit fa0f6ca

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/runtime/utils/fetch-retry.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ export async function fetchWithRetry(req: RequestInfo | URL, init?: RequestInit)
1414
throw error
1515
}
1616
console.warn(`Retrying fetch attempt ${attempt + 1} for request: ${req}`)
17+
18+
// Small incremental delay before retry
19+
await new Promise(resolve => setTimeout(resolve, 100 * attempt))
1720
}
1821
}
1922
throw new Error('Unreachable code')

0 commit comments

Comments
 (0)