Kong/insomnia · error · Error
invalid type (${type}), it must be noauth | basic | bearer |
Error message
invalid type (${type}), it must be noauth | basic | bearer | jwt | digest | oauth1 | oauth2 | hawk | awsv4 | ntlm | apikey | edgegrid | asap. What it means
Error "invalid type (${type}), it must be noauth | basic | bearer | jwt | digest | oauth1 | oauth2 | hawk | awsv4 | ntlm | apikey | edgegrid | asap." thrown in Kong/insomnia.
Source
Thrown at packages/insomnia-scripting-environment/src/objects/auth.ts:338
obj[this.type] = authOption.map(optValue => optValue.toJSON(), {});
return obj;
}
update(options: VariableList<Variable> | Variable[] | AuthOptions, type?: AuthOptionTypes) {
const currentType = type ? type : this.type;
const authOpts = rawOptionsToVariables(options, currentType);
if (authOpts.length > 0 && authOpts[0]) {
this.type = currentType;
this.authOptions.set(currentType, authOpts[0]);
} else {
throw new Error('no valid RequestAuth options is found');
}
}
use(type: AuthOptionTypes, options: VariableList<Variable> | Variable[] | AuthOptions) {
if (!RequestAuth.isValidType(type)) {
throw new Error(
`invalid type (${type}), it must be noauth | basic | bearer | jwt | digest | oauth1 | oauth2 | hawk | awsv4 | ntlm | apikey | edgegrid | asap.`,
);
}
const authOpts = rawOptionsToVariables(options, type);
if (authOpts.length > 0 && authOpts[0]) {
this.type = type;
this.authOptions.set(type, authOpts[0]);
} else {
throw new Error('no valid RequestAuth options is found');
}
}
}
export function fromPreRequestAuth(auth: RequestAuth): RequestAuthentication {
const authObj = auth.toJSON();
const findValueInKvArray = (targetKey: string, kvs?: { key: string; value: string }[]) =>View on GitHub (pinned to d9bb2b0142)
When it happens
Trigger: Thrown at packages/insomnia-scripting-environment/src/objects/auth.ts:338 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/ca6b2d5dc6855bc3.
Report an issue: GitHub.