{"record":{"id":"36c43ed05fbc09d5","repo":"usestrix/strix","slug":"scope-id-required-for-get","errorCode":null,"errorMessage":"scope_id required for get","messagePattern":"scope_id required for get","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"strix/tools/proxy/caido_api.py","lineNumber":515,"sourceCode":"        )\n\n    return await call_with_client(_run)\n\n\nasync def _scope_rules_with_client(\n    client: CaidoClient,\n    action: ScopeAction,\n    *,\n    allowlist: list[str] | None = None,\n    denylist: list[str] | None = None,\n    scope_id: str | None = None,\n    scope_name: str | None = None,\n) -> Any:\n    if action == \"list\":\n        result = await scope_list(client)\n    elif action == \"get\":\n        if not scope_id:\n            raise ValueError(\"scope_id required for get\")\n        result = await scope_get(client, scope_id)\n    elif action == \"create\":\n        if not scope_name:\n            raise ValueError(\"scope_name required for create\")\n        result = await scope_create(\n            client,\n            name=scope_name,\n            allowlist=allowlist,\n            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,","sourceCodeStart":497,"sourceCodeEnd":533,"githubUrl":"https://github.com/usestrix/strix/blob/85513391305171ecc6faffe03da4a8bda5e3febb/strix/tools/proxy/caido_api.py#L497-L533","documentation":"The Caido scope dispatcher routes action strings to concrete scope operations. For action='get' a scope_id must be supplied; an empty/None scope_id raises ValueError immediately, before any GraphQL call. This is argument validation, not a Caido server error.","triggerScenarios":"Calling the scope tool/handler with action='get' but omitting scope_id, passing an empty string, or passing a falsy value. Typically an LLM agent or script forgot the id parameter.","commonSituations":"Agent tool invocation missing the id argument; caller assumed 'get' with scope_name would work; empty variable expanded to '' in shell-driven calls.","solutions":["First run action='list' to obtain scope ids.","Re-issue the call with action='get' and the concrete scope_id from the listing.","If scripting, assert scope_id is non-empty before invoking the dispatcher."],"exampleFix":"# before\nscope(client, \"get\")                       # no scope_id\n\n# after\nscopes = scope(client, \"list\")\nscope(client, \"get\", scope_id=scopes[0][\"id\"])","handlingStrategy":"validation","validationCode":"REQUIRED = {\"get\": [\"scope_id\"], \"create\": [\"scope_name\"],\n           \"update\": [\"scope_id\", \"scope_name\"], \"delete\": [\"scope_id\"]}\n\ndef validate_scope_args(action, **kw) -> None:\n    for field in REQUIRED.get(action, []):\n        if not kw.get(field):\n            raise ValueError(f\"{field} required for {action}\")","typeGuard":null,"tryCatchPattern":"try:\n    result = scope(client, action, **kwargs)\nexcept ValueError as exc:\n    if \"required for\" in str(exc):\n        kwargs.update(fill_missing_via_list())  # e.g. resolve scope_id from action='list'\n        result = scope(client, action, **kwargs)\n    else:\n        raise","preventionTips":["Always resolve scope ids via action='list' before get/update/delete.","Encode the per-action required-argument table in your caller or tool schema.","Never pass empty strings for ids — the check is falsy-based."],"tags":["proxy","caido","scope","validation"],"backgroundTag":null,"analyzedSha":"85513391305171ecc6faffe03da4a8bda5e3febb","analyzedAt":"2026-08-15T05:03:57.275Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}