{"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":"Error \"bodyResult.error\" thrown in Kong/insomnia.","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":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d9bb2b0142600f21309832daea3317942d285984","analyzedAt":"2026-08-26T18:04:05.187Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}