{"record":{"id":"ccd75fb4ec110efe","repo":"Kong/insomnia","slug":"options-is-not-valid-it-must-be-variablelist-vari","errorCode":null,"errorMessage":"options is not valid: it must be VariableList<Variable> | Variable[] | object","messagePattern":"options is not valid: it must be VariableList<Variable> \\| Variable\\[\\] \\| object","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/insomnia-scripting-environment/src/objects/auth.ts","lineNumber":256,"sourceCode":"        return optsObjEntry[0] === targetType;\n      })\n      .map(optsEntry => {\n        const optVars = optsEntry[1].map((opt: AuthOption) => {\n          return new Variable({\n            key: opt.key,\n            value: opt.value,\n          });\n        });\n        return new VariableList(undefined, optVars);\n      });\n\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","sourceCodeStart":238,"sourceCodeEnd":274,"githubUrl":"https://github.com/Kong/insomnia/blob/d9bb2b0142600f21309832daea3317942d285984/packages/insomnia-scripting-environment/src/objects/auth.ts#L238-L274","documentation":"Error \"options is not valid: it must be VariableList<Variable> | Variable[] | object\" thrown in Kong/insomnia.","triggerScenarios":"Thrown at packages/insomnia-scripting-environment/src/objects/auth.ts:256 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"}