{"record":{"id":"2362449de8709e16","repo":"Kong/insomnia","slug":"the-request-type-must-be-string-request-reque","errorCode":null,"errorMessage":"the request type must be: string | Request | RequestOptions.","messagePattern":"the request type must be: string \\| Request \\| RequestOptions\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/insomnia-scripting-environment/src/objects/send-request.ts","lineNumber":195,"sourceCode":"              // unused fields because they are not persisted\n              disabled: false,\n              isPrivate: false,\n              _id: '',\n              type: '',\n              parentId: '',\n              modified: 0,\n              created: 0,\n              name: '',\n            },\n          ]\n        : [],\n      caCertficatePath: null, // the request in pre-request script doesn't support customizing ca yet\n      socketPath: undefined,\n      authHeader: undefined, // TODO: add this for bearer and other auth methods\n    };\n  }\n\n  throw new Error('the request type must be: string | Request | RequestOptions.');\n}\n\nasync function curlOutputToResponse(\n  result: CurlRequestOutput,\n  request: string | Request | RequestOptions,\n): Promise<Response> {\n  if (result.headerResults.length === 0) {\n    throw new Error('curlOutputToResponse: no header result is found');\n  }\n  if (result.patch.error) {\n    throw result.patch.error;\n  }\n\n  const lastRedirect = result.headerResults[result.headerResults.length - 1];\n  if (!lastRedirect) {\n    throw new Error('curlOutputToResponse: the lastRedirect is not defined');\n  }\n","sourceCodeStart":177,"sourceCodeEnd":213,"githubUrl":"https://github.com/Kong/insomnia/blob/d9bb2b0142600f21309832daea3317942d285984/packages/insomnia-scripting-environment/src/objects/send-request.ts#L177-L213","documentation":"Error \"the request type must be: string | Request | RequestOptions.\" thrown in Kong/insomnia.","triggerScenarios":"Thrown at packages/insomnia-scripting-environment/src/objects/send-request.ts:195 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"}