{"record":{"id":"d8500f8478972fa1","repo":"usestrix/strix","slug":"unknown-action-action","errorCode":null,"errorMessage":"Unknown action: {action}","messagePattern":"Unknown action: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"strix/tools/proxy/caido_api.py","lineNumber":542,"sourceCode":"            denylist=denylist,\n        )\n    elif action == \"update\":\n        if not scope_id or not scope_name:\n            raise ValueError(\"scope_id and scope_name required for update\")\n        result = await scope_update(\n            client,\n            scope_id,\n            name=scope_name,\n            allowlist=allowlist,\n            denylist=denylist,\n        )\n    elif action == \"delete\":\n        if not scope_id:\n            raise ValueError(\"scope_id required for delete\")\n        await scope_delete(client, scope_id)\n        result = {\"deleted\": scope_id}\n    else:\n        raise ValueError(f\"Unknown action: {action}\")\n    return result\n\n\n_SITEMAP_ROOTS_QUERY = \"\"\"\nquery GetSitemapRoots($scopeId: ID) {\n    sitemapRootEntries(scopeId: $scopeId) {\n        edges { node {\n            id kind label hasDescendants\n            metadata { ... on SitemapEntryMetadataDomain { isTls port } }\n            request { method path response { statusCode } }\n        } }\n        count { value }\n    }\n}\n\"\"\"\n\n_SITEMAP_DESCENDANTS_QUERY = \"\"\"\nquery GetSitemapDescendants($parentId: ID!, $depth: SitemapDescendantsDepth!) {","sourceCodeStart":524,"sourceCodeEnd":560,"githubUrl":"https://github.com/usestrix/strix/blob/85513391305171ecc6faffe03da4a8bda5e3febb/strix/tools/proxy/caido_api.py#L524-L560","documentation":"The Caido scope dispatcher ends in an else branch: any action string other than list/get/create/update/delete raises ValueError('Unknown action: {action}'). Valid ScopeAction values are fixed; the dispatcher has no passthrough or default behavior.","triggerScenarios":"Calling the scope handler with action='remove', 'fetch', 'GET' (case mismatch), or any other unlisted verb. Usually a typo or assumption that more actions exist.","commonSituations":"LLM agent inventing an action name; casing differences ('List' vs 'list'); version drift where a docs page mentions an action this Strix version doesn't implement.","solutions":["Use one of the five supported actions exactly: list, get, create, update, delete (lowercase).","Check the tool's schema/signature for the action enum in your Strix version.","If an LLM produced the call, constrain the action parameter in the prompt/tool schema to the valid set."],"exampleFix":"# before\nscope(client, \"remove\", scope_id=sid)\n\n# after\nscope(client, \"delete\", scope_id=sid)","handlingStrategy":"type-guard","validationCode":"SCOPE_ACTIONS = frozenset({\"list\", \"get\", \"create\", \"update\", \"delete\"})\n\ndef is_valid_scope_action(action: str) -> bool:\n    return action in SCOPE_ACTIONS\n\nif not is_valid_scope_action(action):\n    raise ValueError(f\"action must be one of {sorted(SCOPE_ACTIONS)}\")","typeGuard":"from typing import Literal\nScopeAction = Literal[\"list\", \"get\", \"create\", \"update\", \"delete\"]\n\ndef is_scope_action(a: object) -> bool:\n    return isinstance(a, str) and a in {\"list\", \"get\", \"create\", \"update\", \"delete\"}","tryCatchPattern":"try:\n    scope(client, action, **kwargs)\nexcept ValueError as exc:\n    if \"Unknown action\" in str(exc):\n        action = ACTION_ALIASES.get(action, action)  # e.g. remove->delete\n        scope(client, action, **kwargs)\n    else:\n        raise","preventionTips":["Type the action as a Literal/enum in your wrapper so invalid verbs fail at type-check time.","For LLM tool schemas, use an enum constraint on the action parameter.","Lowercase user input before dispatch — the match is exact."],"tags":["proxy","caido","scope","validation","enum"],"backgroundTag":null,"analyzedSha":"85513391305171ecc6faffe03da4a8bda5e3febb","analyzedAt":"2026-08-15T05:03:57.275Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}