MCPcopy
hub / github.com/vercel/next.js / retry

Function retry

packages/font/src/google/retry.ts:4–17  ·  view source on GitHub ↗
(
  fn: asyncRetry.RetryFunction<T>,
  retries: number
)

Source from the content-addressed store, hash-verified

2import asyncRetry from 'next/dist/compiled/async-retry'
3
4export async function retry<T>(
5 fn: asyncRetry.RetryFunction<T>,
6 retries: number
7) {
8 return await asyncRetry(fn, {
9 retries,
10 onRetry(e: unknown, attempt: unknown) {
11 console.error(
12 (e as Error).message + `\n\nRetrying ${attempt}/${retries}...`
13 )
14 },
15 minTimeout: 100,
16 })
17}

Callers 3

fetchFontFileFunction · 0.90
fetchCSSFromGoogleFontsFunction · 0.90
createAppFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected