Kong/insomnia · error · Error
the request type must be: string | Request | RequestOptions.
Error message
the request type must be: string | Request | RequestOptions.
What it means
Error "the request type must be: string | Request | RequestOptions." thrown in Kong/insomnia.
Source
Thrown at packages/insomnia-scripting-environment/src/objects/send-request.ts:195
// unused fields because they are not persisted
disabled: false,
isPrivate: false,
_id: '',
type: '',
parentId: '',
modified: 0,
created: 0,
name: '',
},
]
: [],
caCertficatePath: null, // the request in pre-request script doesn't support customizing ca yet
socketPath: undefined,
authHeader: undefined, // TODO: add this for bearer and other auth methods
};
}
throw new Error('the request type must be: string | Request | RequestOptions.');
}
async function curlOutputToResponse(
result: CurlRequestOutput,
request: string | Request | RequestOptions,
): Promise<Response> {
if (result.headerResults.length === 0) {
throw new Error('curlOutputToResponse: no header result is found');
}
if (result.patch.error) {
throw result.patch.error;
}
const lastRedirect = result.headerResults[result.headerResults.length - 1];
if (!lastRedirect) {
throw new Error('curlOutputToResponse: the lastRedirect is not defined');
}
View on GitHub (pinned to d9bb2b0142)
When it happens
Trigger: Thrown at packages/insomnia-scripting-environment/src/objects/send-request.ts:195 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Kong/insomnia@d9bb2b0142 (2026-08-26).
Data as JSON: /api/errors/2362449de8709e16.
Report an issue: GitHub.