Kong/insomnia · error · Error

Failed to read body: ${readResponseResult.error}

Error message

Failed to read body: ${readResponseResult.error}

What it means

Error "Failed to read body: ${readResponseResult.error}" thrown in Kong/insomnia.

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)

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.