Kong/insomnia · error · Error
types is not supported yet
Error message
types is not supported yet
What it means
Deliberate unsupported-API error on the Variable class: static Variable.types() exists only for Postman SDK shape compatibility and is marked 'unknown usage and unsupported', so it always throws when a script or code path calls it.
Solutions
- Remove Variable.types() usage from scripts; it has no functional equivalent in Insomnia
- Inspect Variable instances directly (key, value, type fields) instead of querying static type metadata
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/insomnia-scripting-environment/src/objects/variables.ts:72 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/deb3f0339252f644.
Report an issue: GitHub.
Appendix: source
Thrown at packages/insomnia-scripting-environment/src/objects/variables.ts:72
*/
constructor(def?: VariableDefinition) {
super();
this.id = def ? def.id || '' : '';
this.key = def ? def.key : '';
this.name = def ? def.name : '';
this.value = def ? def.value : '';
this.type = def && def.type ? def.type : 'Variable';
this.disabled = def ? def.disabled : false;
}
/** @ignore */
static override _index = 'key';
// unknown usage and unsupported
/** @ignore */
static types() {
throw unsupportedError('types');
}
/**
* This method casts the provided value to its underlying value if it is a Variable object.
*
* @param value - The value to be cast. It can be of any type.
* @returns The underlying value of the Variable object if the input is a Variable; otherwise, returns `undefined`.
*/
cast(value: any) {
if ('_kind' in value && value._kind === 'Variable') {
return value.value;
}
return;
}
/**
* Retrieves the current value of the variable.
*View on GitHub (pinned to d9bb2b0142)