{"record":{"id":"e2267a63ab2ebb47","repo":"Kong/insomnia","slug":"patch-error","errorCode":null,"errorMessage":"patch.error","messagePattern":"patch\\.error","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/insomnia/src/plugins/context/network.ts","lineNumber":87,"sourceCode":"            body: {},\n            cookieJar: {\n              cookies: [],\n            },\n            cookies: [],\n            suppressUserAgent: false,\n            settingFollowRedirects,\n            settingRebuildPath: true,\n            settingSendCookies: true,\n            ...originRequest,\n          },\n          finalUrl: originRequest.url,\n          settings,\n          certificates: [],\n          caCertficatePath,\n        });\n        const { headerResults, patch, responseBodyPath } = response;\n        if (patch.error) {\n          throw new Error(patch.error);\n        }\n        if (headerResults.length === 0) {\n          throw new Error('Error in response: no header result is found');\n        }\n        const lastRedirect = headerResults[headerResults.length - 1];\n        if (!lastRedirect) {\n          throw new Error('Error in response: the lastRedirect is not defined');\n        }\n        const bodyResult = await services.helpers.readCurlResponse({\n          bodyPath: responseBodyPath,\n          bodyCompression: patch.bodyCompression,\n        });\n\n        return {\n          code: lastRedirect.code,\n          reason: lastRedirect.reason,\n          headers: lastRedirect.headers,\n          responseTime: patch.elapsedTime,","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/Kong/insomnia/blob/d9bb2b0142600f21309832daea3317942d285984/packages/insomnia/src/plugins/context/network.ts#L69-L105","documentation":"Error \"patch.error\" thrown in Kong/insomnia.","triggerScenarios":"Thrown at packages/insomnia/src/plugins/context/network.ts:87 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"}