Kong/insomnia · error · Error

Failed to read response body from filesystem

Error message

Failed to read response body from filesystem

What it means

Fallback in downloadResponseBody: the response has a bodyPath on disk but neither an in-memory bodyBuffer nor a readable disk buffer was obtained, so there is nothing to write to the downloaded file — indicates the body file is missing or unreadable.

Solutions

  1. Re-send the request to regenerate the stored response body
  2. Check the responses directory under INSOMNIA_DATA_PATH for the missing body file
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at packages/insomnia/src/ui/components/panes/response-pane-utils.ts:62 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/6d63a5083770360a. Report an issue: GitHub.

Appendix: source

Thrown at packages/insomnia/src/ui/components/panes/response-pane-utils.ts:62

      bodyCompression: activeResponse.bodyCompression === 'zip' ? 'zip' : null,
    });
    return;
  }

  let bodyBuffer = activeResponse.bodyBuffer ?? null;

  if (!bodyBuffer && getBodyBuffer) {
    const diskBodyBuffer = await getBodyBuffer();
    if (typeof diskBodyBuffer === 'string') {
      throw new TypeError(diskBodyBuffer);
    }
    if (diskBodyBuffer) {
      bodyBuffer = diskBodyBuffer;
    }
  }

  if (!bodyBuffer && activeResponse.bodyPath) {
    throw new Error('Failed to read response body from filesystem');
  }

  if (prettify && contentType.includes('json')) {
    await window.main.writeFile({
      path: outputPath,
      content: jsonPrettify(bodyBufferToUtf8(bodyBuffer)) || '',
    });
    return;
  }
  await window.main.writeFile({ path: outputPath, content: bodyBuffer ?? new Uint8Array(0) });
}

View on GitHub (pinned to d9bb2b0142)