hoppscotch/hoppscotch · error · Error

pm.vault.unset() is not supported in Hoppscotch (Postman Vau

Error message

pm.vault.unset() is not supported in Hoppscotch (Postman Vault feature)

What it means

Thrown by `pm.vault.unset()` (post-request.js:3987). Completes the unsupported-vault trio; deleting a vault entry has no Hoppscotch implementation, so the method always throws. Arguments are ignored.

Source

Thrown at packages/hoppscotch-js-sandbox/src/bootstrap-code/post-request.js:3987

          }
        )
      }
    },

    // Postman Vault (unsupported)
    vault: {
      get: () => {
        throw new Error(
          "pm.vault.get() is not supported in Hoppscotch (Postman Vault feature)"
        )
      },
      set: () => {
        throw new Error(
          "pm.vault.set() is not supported in Hoppscotch (Postman Vault feature)"
        )
      },
      unset: () => {
        throw new Error(
          "pm.vault.unset() is not supported in Hoppscotch (Postman Vault feature)"
        )
      },
    },

    // Postman Visualizer (unsupported)
    visualizer: {
      set: () => {
        throw new Error(
          "pm.visualizer.set() is not supported in Hoppscotch (Postman Visualizer feature)"
        )
      },
      clear: () => {
        throw new Error(
          "pm.visualizer.clear() is not supported in Hoppscotch (Postman Visualizer feature)"
        )
      },
    },

View on GitHub (pinned to 1acb8a3a75)

Solutions

  1. Remove the `pm.vault.unset(...)` call.
  2. Manage secret lifecycle (create/delete) in the Hoppscotch UI or CI, not in-script.
  3. If you need to clear a local value, `pw.env.unset('key')` for env-scoped variables.
  4. Document vault operations as unsupported during collection migration.

Example fix

// before
pm.vault.unset('apiKey')
// after
pw.env.unset('apiKey')
Defensive patterns

Strategy: validation

Validate before calling

// Don't call pm.vault.unset; clear env-scoped values if needed
pw.env.unset('apiKey')

Prevention

When it happens

Trigger: Calling `pm.vault.unset('apiKey')` in any script. Always throws.

Common situations: Porting Postman scripts that clear/rotate secrets via `pm.vault.unset`. Cleanup logic that wipes a credential at the end of a run.

Related errors


AI-assisted analysis of hoppscotch/hoppscotch@1acb8a3a75 (2026-08-12). Data as JSON: /api/errors/0b52d2ac9d751a4a. Report an issue: GitHub.