get

tcmts.cli.test.e2e.prod.get · #lr5v4vey · term · runs anywhere

fetch, retried once on a keep-alive connection reset (see web.ts).

export async function get(url: string | URL, init?: RequestInit): Promise<Response> {
  try {
    return await fetch(url, init);
  } catch (e) {
    if ((e as { cause?: { code?: string } }).cause?.code !== "ECONNRESET") throw e;
    return fetch(url, init);
  }
}

used by