{"record":{"id":"2e170c36542b0b38","repo":"oven-sh/bun","slug":"path-r-status-r-statustext","errorCode":null,"errorMessage":"${path}: ${r.status} ${r.statusText}","messagePattern":"\\$\\{path\\}: \\$\\{r\\.status\\} \\$\\{r\\.statusText\\}","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/update-parallel-allowlist.mjs","lineNumber":43,"sourceCode":"const token = process.env.BUILDKITE_API_TOKEN || process.env.BUILDKITE_TOKEN;\nif (!token) {\n  console.error(\"BUILDKITE_API_TOKEN is required\");\n  process.exit(1);\n}\n\nconst api = async path => {\n  for (let attempt = 0; ; attempt++) {\n    const r = await fetch(`https://api.buildkite.com/v2/organizations/${opts.org}/pipelines/${opts.pipeline}/${path}`, {\n      headers: { Authorization: `Bearer ${token}` },\n      signal: AbortSignal.timeout(60_000),\n    });\n    if (r.ok) return r;\n    if ((r.status === 429 || r.status >= 500) && attempt < 8) {\n      const backoff = Number(r.headers.get(\"retry-after\")) * 1000 || 1000 * 2 ** attempt;\n      await new Promise(resolve => setTimeout(resolve, backoff));\n      continue;\n    }\n    throw new Error(`${path}: ${r.status} ${r.statusText}`);\n  }\n};\n\nconst isNodeStyle = p =>\n  p.includes(\"js/node/test/parallel/\") || p.includes(\"js/node/test/sequential/\") || p.includes(\"js/bun/test/parallel/\");\nfunction listBunTestFiles() {\n  const out = [];\n  const walk = rel => {\n    for (const entry of readdirSync(join(testDir, rel), { withFileTypes: true })) {\n      const path = rel ? `${rel}/${entry.name}` : entry.name;\n      if (/node_modules|node\\.js/.test(rel) || /^\\./.test(entry.name)) continue;\n      if (entry.isDirectory()) walk(path);\n      else if (/\\.(c|m)?(j|t)sx?$/.test(entry.name) && /\\.test|spec\\./.test(entry.name) && !isNodeStyle(path)) {\n        out.push(path);\n      }\n    }\n  };\n  walk(\"\");","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/scripts/update-parallel-allowlist.mjs#L25-L61","documentation":"Error \"${path}: ${r.status} ${r.statusText}\" thrown in oven-sh/bun.","triggerScenarios":"Thrown at scripts/update-parallel-allowlist.mjs:43 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}