{"record":{"id":"5e555008d20e812e","repo":"Kong/insomnia","slug":"invalid-auth-type-options-type","errorCode":null,"errorMessage":"invalid auth type ${options.type}","messagePattern":"invalid auth type (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/insomnia-scripting-environment/src/objects/auth.ts","lineNumber":267,"sourceCode":"\n    return optsVarLists;\n  } else if ('length' in options) {\n    // array\n    return [new VariableList(undefined, options)];\n  }\n\n  throw new Error('options is not valid: it must be VariableList<Variable> | Variable[] | object');\n}\n\nexport class RequestAuth extends Property {\n  private type: AuthOptionTypes;\n  private authOptions = new Map<string, VariableList<Variable>>();\n\n  constructor(options: AuthOptions, parent?: Property) {\n    super();\n\n    if (!RequestAuth.isValidType(options.type)) {\n      throw new Error(`invalid auth type ${options.type}`);\n    }\n\n    this.type = options.type;\n    const optsObj = options as AuthOptions;\n    const optsEntries = Object.entries(optsObj).filter(optsObjEntry => optsObjEntry[0] !== 'type');\n\n    optsEntries\n      .map((optsEntry: [string, AuthOption[]]) => {\n        const optVars = optsEntry[1].map(opt => {\n          return new Variable({\n            key: opt.key,\n            value: opt.value,\n            type: opt.type,\n          });\n        });\n\n        return {\n          type: optsEntry[0],","sourceCodeStart":249,"sourceCodeEnd":285,"githubUrl":"https://github.com/Kong/insomnia/blob/d9bb2b0142600f21309832daea3317942d285984/packages/insomnia-scripting-environment/src/objects/auth.ts#L249-L285","documentation":"Constructor guard for the scripting-environment RequestAuth class: options.type is not one of the recognized authentication types (noauth, basic, bearer, jwt, digest, oauth1, oauth2, hawk, awsv4, ntlm, apikey, edgegrid, asap). The invalid type value is interpolated in the message.","triggerScenarios":"Thrown at packages/insomnia-scripting-environment/src/objects/auth.ts:267 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a supported type: noauth, basic, bearer, jwt, digest, oauth1, oauth2, hawk, awsv4, ntlm, apikey, edgegrid, asap, netrc","Check for typos in the type string in the script/request definition"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d9bb2b0142600f21309832daea3317942d285984","analyzedAt":"2026-08-26T18:04:05.187Z","contentChangedAt":"2026-08-26T18:04:05.187Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}