Kong/insomnia · error · Error
Invalid certificate configuration: "cert+key" and "pfx" can
Error message
Invalid certificate configuration: "cert+key" and "pfx" can not be set at the same time
What it means
Error "Invalid certificate configuration: "cert+key" and "pfx" can not be set at the same time" thrown in Kong/insomnia.
Source
Thrown at packages/insomnia-scripting-environment/src/objects/request.ts:577
_id: '',
type: 'ClientCertificate',
parentId: '',
modified: 0,
created: 0,
isPrivate: false,
name: updatedReq.certificate.name || '',
disabled: updatedReq.certificate.disabled || false,
host: '*',
key: updatedReq.certificate.key?.src,
cert: updatedReq.certificate.cert?.src,
passphrase: updatedReq.certificate.passphrase || null,
pfx: null,
};
return [specifiedCert, ...originalClientCertificates];
}
throw new Error('Invalid certificate configuration: "cert+key" and "pfx" can not be set at the same time');
}
export function toScriptRequestBody(insomniaReqBody: InsomniaRequestBody): RequestBodyOptions {
let reqBodyOpt: RequestBodyOptions = { mode: undefined };
if (insomniaReqBody.text !== undefined) {
reqBodyOpt = {
mode: 'raw',
raw: insomniaReqBody.text,
};
} else if (insomniaReqBody.fileName !== undefined && insomniaReqBody.fileName !== '') {
reqBodyOpt = {
mode: 'file',
file: insomniaReqBody.fileName,
};
} else if (insomniaReqBody.params !== undefined) {
reqBodyOpt = {
mode: 'urlencoded',View on GitHub (pinned to d9bb2b0142)
When it happens
Trigger: Thrown at packages/insomnia-scripting-environment/src/objects/request.ts:577 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- SSL/TLS and certificate errors — how TLS handshakes and certificate validation fail.
AI-assisted analysis of Kong/insomnia@d9bb2b0142 (2026-08-26).
Data as JSON: /api/errors/ae2c3f7139fd3a71.
Report an issue: GitHub.