oven-sh/bun · error · Error

server responded with code ${response.status}

Error message

server responded with code ${response.status}

What it means

Error "server responded with code ${response.status}" thrown in oven-sh/bun.

Source

Thrown at scripts/runner.node.mjs:1891

            }
          }
        }
      }
    }

    // Skip this if the remap server didn't work or if Bun exited normally
    // (tests in which a subprocess crashed should at least set exit code 1)
    if (typeof remapPort == "number" && result.exitCode !== 0) {
      try {
        // When Bun crashes, it exits before the subcommand it runs to upload the crash report has necessarily finished.
        // So wait a little bit to make sure that the crash report has at least started uploading
        // (once the server sees the /ack request then /traces will wait for any crashes to finish processing)
        // There is a bug that if a test causes crash reports but exits with code 0, the crash reports will instead
        // be attributed to the next test that fails. I'm not sure how to fix this without adding a sleep in between
        // all tests (which would slow down CI a lot).
        await setTimeoutPromise(500);
        const response = await fetch(`http://localhost:${remapPort}/traces`);
        if (!response.ok || response.status !== 200) throw new Error(`server responded with code ${response.status}`);
        const traces = await response.json();
        if (traces.length > 0) {
          result.ok = false;
          if (!isAlwaysFailure(result.error)) result.error = "crash reported";

          crashes += `${traces.length} crashes reported during this test\n`;
          for (const t of traces) {
            if (t.failed_parse) {
              crashes += "Trace string failed to parse:\n";
              crashes += t.failed_parse + "\n";
            } else if (t.failed_remap) {
              crashes += "Parsed trace failed to remap:\n";
              crashes += JSON.stringify(t.failed_remap, null, 2) + "\n";
            } else {
              crashes += "================\n";
              crashes += t.remap + "\n";
            }
          }

View on GitHub (pinned to 8c5296ac45)

When it happens

Trigger: Thrown at scripts/runner.node.mjs:1891 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of oven-sh/bun@8c5296ac45 (2026-08-16). Data as JSON: /api/errors/1c5f113e656aa8c5. Report an issue: GitHub.