{"record":{"id":"6d63a5083770360a","repo":"Kong/insomnia","slug":"failed-to-read-response-body-from-filesystem","errorCode":null,"errorMessage":"Failed to read response body from filesystem","messagePattern":"Failed to read response body from filesystem","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/insomnia/src/ui/components/panes/response-pane-utils.ts","lineNumber":62,"sourceCode":"      bodyCompression: activeResponse.bodyCompression === 'zip' ? 'zip' : null,\n    });\n    return;\n  }\n\n  let bodyBuffer = activeResponse.bodyBuffer ?? null;\n\n  if (!bodyBuffer && getBodyBuffer) {\n    const diskBodyBuffer = await getBodyBuffer();\n    if (typeof diskBodyBuffer === 'string') {\n      throw new TypeError(diskBodyBuffer);\n    }\n    if (diskBodyBuffer) {\n      bodyBuffer = diskBodyBuffer;\n    }\n  }\n\n  if (!bodyBuffer && activeResponse.bodyPath) {\n    throw new Error('Failed to read response body from filesystem');\n  }\n\n  if (prettify && contentType.includes('json')) {\n    await window.main.writeFile({\n      path: outputPath,\n      content: jsonPrettify(bodyBufferToUtf8(bodyBuffer)) || '',\n    });\n    return;\n  }\n  await window.main.writeFile({ path: outputPath, content: bodyBuffer ?? new Uint8Array(0) });\n}\n","sourceCodeStart":44,"sourceCodeEnd":74,"githubUrl":"https://github.com/Kong/insomnia/blob/d9bb2b0142600f21309832daea3317942d285984/packages/insomnia/src/ui/components/panes/response-pane-utils.ts#L44-L74","documentation":"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.","triggerScenarios":"Thrown at packages/insomnia/src/ui/components/panes/response-pane-utils.ts:62 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-send the request to regenerate the stored response body","Check the responses directory under INSOMNIA_DATA_PATH for the missing body file"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d9bb2b0142600f21309832daea3317942d285984","analyzedAt":"2026-08-26T18:04:05.187Z","contentChangedAt":"2026-08-26T18:04:05.187Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}