{"record":{"id":"d1b5e0115558b524","repo":"hashicorp/vault","slug":"given-param-is-not-a-supported-tool-action","errorCode":null,"errorMessage":"Given param is not a supported tool action","messagePattern":"Given param is not a supported tool action","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"ui/app/routes/vault/cluster/tools/tool.js","lineNumber":15,"sourceCode":"/**\n * Copyright IBM Corp. 2016, 2025\n * SPDX-License-Identifier: BUSL-1.1\n */\n\nimport Route from '@ember/routing/route';\nimport { toolsActions } from 'vault/helpers/tools-actions';\n\nexport default Route.extend({\n  model(params) {\n    const supportedActions = toolsActions();\n    if (supportedActions.includes(params.selected_action)) {\n      return params.selected_action;\n    }\n    throw new Error('Given param is not a supported tool action');\n  },\n\n  setupController(controller, model) {\n    this._super(...arguments);\n    controller.set('selectedAction', model);\n  },\n\n  actions: {\n    didTransition() {\n      const params = this.paramsFor(this.routeName);\n      /* eslint-disable-next-line ember/no-controller-access-in-routes */\n      this.controller.setProperties(params);\n      return true;\n    },\n  },\n});\n","sourceCodeStart":1,"sourceCodeEnd":32,"githubUrl":"https://github.com/hashicorp/vault/blob/744b611b5700b3b7f82d76b4d6938a91b9989367/ui/app/routes/vault/cluster/tools/tool.js#L1-L32","documentation":"Thrown by the tools route model (ui/app/routes/vault/cluster/tools/tool.js:15). The route validates the selected_action URL segment against the fixed list from the tools-actions helper: wrap, lookup, unwrap, rewrap, random, hash. Anything else fails the includes() check and throws instead of rendering a tool form.","triggerScenarios":"Navigating to /ui/vault/tools/<action> where <action> is not one of wrap|lookup|unwrap|rewrap|random|hash — a typo, an outdated link, or a tool removed/renamed across versions.","commonSituations":"Bookmarked or shared links to tool sub-pages that no longer match the supported list; users hand-editing the URL; documentation written for a different Vault version.","solutions":["Use one of the supported tool actions: wrap, lookup, unwrap, rewrap, random, or hash","Navigate via Tools in the UI sidebar so the action link is always a valid one","Update stale bookmarks or links pointing at unsupported action names"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const TOOLS_ACTIONS = ['wrap', 'lookup', 'unwrap', 'rewrap', 'random', 'hash'];\nif (!TOOLS_ACTIONS.includes(params.selected_action)) {\n  this.router.transitionTo('vault.cluster.tools'); // bounce to the tool picker instead of throwing\n}","typeGuard":"import { toolsActions } from 'vault/helpers/tools-actions';\nfunction isSupportedToolAction(action: string): boolean {\n  return toolsActions().includes(action as never);\n}","tryCatchPattern":"try {\n  await this.router.transitionTo('vault.cluster.tools.tool', action);\n} catch (e) {\n  if (e.message === 'Given param is not a supported tool action') {\n    this.router.transitionTo('vault.cluster.tools');\n  } else {\n    throw e;\n  }\n}","preventionTips":["Link to tool pages only with names from the tools-actions helper list","Regenerate bookmarks/links after Vault UI upgrades in case tool names change"],"tags":["tools","routing","validation","url-params"],"backgroundTag":null,"analyzedSha":"744b611b5700b3b7f82d76b4d6938a91b9989367","analyzedAt":"2026-08-15T14:40:29.333Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}