Kong/insomnia · error · Error
Vault is disabled in script
Error message
Vault is disabled in script
What it means
Error "Vault is disabled in script" thrown in Kong/insomnia.
Source
Thrown at packages/insomnia-scripting-environment/src/objects/environments.ts:405
* ```
*/
export class Vault extends Environment {
/**
* Constructs an instance of the Vault class.
*
* @param name - The name associated with the environment.
* @param jsonObject - An optional JSON object representing the vault's data.
* @param enableVaultInScripts - A boolean flag indicating whether vault access is enabled in scripts.
*
* @throws Will throw an error if `enableVaultInScripts` is `false` and an attempt is made to get or set a property.
*/
constructor(name: string, jsonObject: object | undefined, enableVaultInScripts: boolean) {
super(name, jsonObject);
return new Proxy(this, {
// throw error on get or set method call if enableVaultInScripts is false
get: (target, prop, receiver) => {
if (!enableVaultInScripts) {
throw new Error('Vault is disabled in script');
}
return Reflect.get(target, prop, receiver);
},
set: (target, prop, value, receiver) => {
if (!enableVaultInScripts) {
throw new Error('Vault is disabled in script');
}
return Reflect.set(target, prop, value, receiver);
},
});
}
/** @ignore */
unset = () => {
throw new Error('Vault can not be unset in script');
};
/** @ignore */View on GitHub (pinned to d9bb2b0142)
When it happens
Trigger: Thrown at packages/insomnia-scripting-environment/src/objects/environments.ts:405 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/1a356f40b9916367.
Report an issue: GitHub.