{"record":{"id":"ae2c3f7139fd3a71","repo":"Kong/insomnia","slug":"invalid-certificate-configuration-cert-key-and","errorCode":null,"errorMessage":"Invalid certificate configuration: \"cert+key\" and \"pfx\" can not be set at the same time","messagePattern":"Invalid certificate configuration: \"cert\\+key\" and \"pfx\" can not be set at the same time","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/insomnia-scripting-environment/src/objects/request.ts","lineNumber":577,"sourceCode":"      _id: '',\n      type: 'ClientCertificate',\n      parentId: '',\n      modified: 0,\n      created: 0,\n      isPrivate: false,\n      name: updatedReq.certificate.name || '',\n      disabled: updatedReq.certificate.disabled || false,\n      host: '*',\n      key: updatedReq.certificate.key?.src,\n      cert: updatedReq.certificate.cert?.src,\n      passphrase: updatedReq.certificate.passphrase || null,\n      pfx: null,\n    };\n\n    return [specifiedCert, ...originalClientCertificates];\n  }\n\n  throw new Error('Invalid certificate configuration: \"cert+key\" and \"pfx\" can not be set at the same time');\n}\n\nexport function toScriptRequestBody(insomniaReqBody: InsomniaRequestBody): RequestBodyOptions {\n  let reqBodyOpt: RequestBodyOptions = { mode: undefined };\n\n  if (insomniaReqBody.text !== undefined) {\n    reqBodyOpt = {\n      mode: 'raw',\n      raw: insomniaReqBody.text,\n    };\n  } else if (insomniaReqBody.fileName !== undefined && insomniaReqBody.fileName !== '') {\n    reqBodyOpt = {\n      mode: 'file',\n      file: insomniaReqBody.fileName,\n    };\n  } else if (insomniaReqBody.params !== undefined) {\n    reqBodyOpt = {\n      mode: 'urlencoded',","sourceCodeStart":559,"sourceCodeEnd":595,"githubUrl":"https://github.com/Kong/insomnia/blob/d9bb2b0142600f21309832daea3317942d285984/packages/insomnia-scripting-environment/src/objects/request.ts#L559-L595","documentation":"Error \"Invalid certificate configuration: \"cert+key\" and \"pfx\" can not be set at the same time\" thrown in Kong/insomnia.","triggerScenarios":"Thrown at packages/insomnia-scripting-environment/src/objects/request.ts:577 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"}