Kong/insomnia · error · Error

invalid auth type ${options.type}

Error message

invalid auth type ${options.type}

What it means

Error "invalid auth type ${options.type}" thrown in Kong/insomnia.

Source

Thrown at packages/insomnia-scripting-environment/src/objects/auth.ts:267

    return optsVarLists;
  } else if ('length' in options) {
    // array
    return [new VariableList(undefined, options)];
  }

  throw new Error('options is not valid: it must be VariableList<Variable> | Variable[] | object');
}

export class RequestAuth extends Property {
  private type: AuthOptionTypes;
  private authOptions = new Map<string, VariableList<Variable>>();

  constructor(options: AuthOptions, parent?: Property) {
    super();

    if (!RequestAuth.isValidType(options.type)) {
      throw new Error(`invalid auth type ${options.type}`);
    }

    this.type = options.type;
    const optsObj = options as AuthOptions;
    const optsEntries = Object.entries(optsObj).filter(optsObjEntry => optsObjEntry[0] !== 'type');

    optsEntries
      .map((optsEntry: [string, AuthOption[]]) => {
        const optVars = optsEntry[1].map(opt => {
          return new Variable({
            key: opt.key,
            value: opt.value,
            type: opt.type,
          });
        });

        return {
          type: optsEntry[0],

View on GitHub (pinned to d9bb2b0142)

When it happens

Trigger: Thrown at packages/insomnia-scripting-environment/src/objects/auth.ts:267 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/5e555008d20e812e. Report an issue: GitHub.