{"record":{"id":"d6bb94d66cb707aa","repo":"Kong/insomnia","slug":"bodyresult-error","errorCode":null,"errorMessage":"bodyResult.error","messagePattern":"bodyResult\\.error","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/insomnia-scripting-environment/src/objects/send-request.ts","lineNumber":270,"sourceCode":"\n  if (!result.responseBodyPath) {\n    return new Response({\n      code: lastRedirect.code,\n      reason: lastRedirect.reason,\n      header: headers,\n      cookie: cookies as CookieOptions[],\n      body: '',\n      stream: undefined,\n      responseTime: result.patch.elapsedTime,\n      originalRequest,\n    });\n  }\n  const bodyResult = await services.helpers.readCurlResponse({\n    bodyPath: result.responseBodyPath,\n    bodyCompression: result.patch.bodyCompression,\n  });\n  if (bodyResult.error) {\n    throw new Error(bodyResult.error);\n  }\n  return new Response({\n    code: lastRedirect.code,\n    reason: lastRedirect.reason,\n    header: headers,\n    cookie: cookies as CookieOptions[],\n    body: bodyResult.body,\n    // stream is always undefined\n    // because it is inaccurate to differentiate if body is binary\n    stream: undefined,\n    responseTime: result.patch.elapsedTime,\n    originalRequest,\n  });\n}\n","sourceCodeStart":252,"sourceCodeEnd":285,"githubUrl":"https://github.com/Kong/insomnia/blob/d9bb2b0142600f21309832daea3317942d285984/packages/insomnia-scripting-environment/src/objects/send-request.ts#L252-L285","documentation":"Re-raise in curlOutputToResponse after reading the curl response body from disk: the readCurlResponse service reported an error (e.g. decompression or file read failure), and that error message is surfaced as this Error.","triggerScenarios":"Thrown at packages/insomnia-scripting-environment/src/objects/send-request.ts:270 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the sendRequest call","Check temp-file cleanup and disk health","Report persistent body-read failures"],"exampleFix":null,"handlingStrategy":"retry","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"}