Kong/insomnia · error · Error

Failed to read body

Error message

Failed to read body: ${readResponseResult.error}

What it means

Thrown by readBodyFromPath when reading the curl response body from its on-disk bodyPath returns an error result — the temp file backing the response body could not be read (deleted, unreadable, or decompression failure).

Solutions

  1. Retry the request so the body file is rewritten
  2. Check disk space and temp-dir permissions
  3. Report if body files are being cleaned up prematurely
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at packages/insomnia-scripting-environment/src/objects/response.ts:403 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Kong/insomnia@d9bb2b0142 (2026-08-26). Data as JSON: /api/errors/d78024b06906a51b. Report an issue: GitHub.

Appendix: source

Thrown at packages/insomnia-scripting-environment/src/objects/response.ts:403

  return new Response(responseOption);
}

export async function readBodyFromPath(
  response: sendCurlAndWriteTimelineResponse | sendCurlAndWriteTimelineError | undefined,
) {
  // it allows to execute scripts (e.g., for testing) but body contains nothing
  if (!response || 'error' in response) {
    return '';
  } else if (!response.bodyPath) {
    return '';
  }
  const readResponseResult = await services.helpers.readCurlResponse({
    bodyPath: response.bodyPath,
    bodyCompression: response.bodyCompression,
  });

  if (readResponseResult.error) {
    throw new Error(`Failed to read body: ${readResponseResult.error}`);
  }
  return readResponseResult.body;
}

View on GitHub (pinned to d9bb2b0142)