{"record":{"id":"5c133d80422b1e13","repo":"alibaba/arthas","slug":"unsupported-action-action","errorCode":null,"errorMessage":"Unsupported action: ${action}","messagePattern":"Unsupported action: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/TimeTunnelTool.java","lineNumber":138,"sourceCode":"                if (index == null) {\n                    throw new IllegalArgumentException(action + \" operation requires index parameter\");\n                }\n                break;\n            case \"search\":\n                if (searchExpression == null || searchExpression.trim().isEmpty()) {\n                    throw new IllegalArgumentException(\"search operation requires searchExpression parameter\");\n                }\n                break;\n            case \"delete\":\n                if (index == null) {\n                    throw new IllegalArgumentException(\"delete operation requires index parameter\");\n                }\n                break;\n            case \"list\":\n            case \"deleteall\":\n                break;\n            default:\n                throw new IllegalArgumentException(\"Unsupported action: \" + action);\n        }\n    }\n\n    /**\n     * 标准化操作类型\n     */\n    private String normalizeAction(String action) {\n        if (action == null || action.trim().isEmpty()) {\n            return \"record\";\n        }\n\n        String normalizedAction = action.trim().toLowerCase();\n\n        switch (normalizedAction) {\n            case \"record\":\n            case \"r\":\n            case \"-t\":\n            case \"t\":","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/alibaba/arthas/blob/21cf2e9ba52b305290be7223b980ff504bb9cb5b/core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/TimeTunnelTool.java#L120-L156","documentation":"validateParameters rejects any action that normalizeAction could not map to a known canonical form (record, list, info, search, replay, delete, deleteall). This is the primary and normally-reachable validation gate for unknown tt actions.","triggerScenarios":"Passing an action string (after lowercasing and alias mapping) that does not match any known action or alias. normalizeAction returns unrecognized values as-is, which then falls through to this default case.","commonSituations":"Typo in the action name; using an unsupported action; passing a flag like '-t' that normalizeAction does map (so it would not hit this), versus a genuinely unknown string.","solutions":["Use a valid action or its alias: record/t, list/l, info/i, search/s, replay/p, delete/d, deleteAll/da.","Check spelling and casing (the input is lowercased before matching).","If action is omitted entirely it defaults to record, so this error only fires for non-empty unrecognized values."],"exampleFix":"// before\ntt(action=\"watch\")\n// after\ntt(action=\"record\", classPattern=\"demo.MathGame\", methodPattern=\"*\")","handlingStrategy":"validation","validationCode":"// Before calling tt, validate action against known values and aliases\nSet<String> valid = Set.of(\"record\",\"t\",\"list\",\"l\",\"info\",\"i\",\"search\",\"s\",\n    \"replay\",\"p\",\"delete\",\"d\",\"deleteall\",\"da\");\nif (action != null && !action.trim().isEmpty()\n        && !valid.contains(action.trim().toLowerCase())) {\n    throw new IllegalArgumentException(\"Unsupported tt action: \" + action);\n}","typeGuard":null,"tryCatchPattern":"try {\n    String result = timeTunnel(action, ...);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().startsWith(\"Unsupported action\")) {\n        // action not recognized — check valid actions in the message\n    }\n}","preventionTips":["Use valid tt actions or their short aliases (t/l/i/s/p/d/da).","Remember that a null/empty action defaults to record, not an error.","Validate non-empty action values client-side against the known set."],"tags":["tt","invalid-param","enum","validation","timetunnel","arthas-mcp"],"backgroundTag":null,"analyzedSha":"21cf2e9ba52b305290be7223b980ff504bb9cb5b","analyzedAt":"2026-08-14T00:57:07.243Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}