{"record":{"id":"b2b11ac8cf5fdf30","repo":"floci-io/floci","slug":"invalidaction","errorCode":"InvalidAction","errorMessage":"Action {} is not supported","messagePattern":"Action (.+?) is not supported","errorType":"error_code","errorClass":"AwsException","httpStatus":400,"severity":"error","filePath":"src/main/java/io/github/hectorvent/floci/services/athena/AthenaJsonHandler.java","lineNumber":108,"sourceCode":"            }\n            case \"GetTableMetadata\" -> {\n                String catalog = request.has(\"CatalogName\") ? request.get(\"CatalogName\").asText() : AthenaService.DEFAULT_CATALOG;\n                String database = request.path(\"DatabaseName\").asText(request.path(\"Database\").asText(\"\"));\n                String tableName = request.get(\"TableName\").asText();\n                yield Response.ok(Map.of(\"TableMetadata\", athenaService.getTableMetadata(catalog, database, tableName))).build();\n            }\n            case \"DeleteWorkGroup\" -> {\n                String wg = request.path(\"WorkGroup\").asText(null);\n                if (wg == null || !wg.matches(\"[a-zA-Z0-9._-]{1,128}\")) {\n                    throw new AwsException(\"InvalidRequestException\", \"WorkGroup is required.\", 400);\n                }\n                if (\"primary\".equals(wg)) {\n                    throw new AwsException(\"InvalidRequestException\", \"The primary workgroup cannot be deleted.\", 400);\n                }\n                athenaService.deleteWorkGroup(wg, region);\n                yield Response.ok(Map.of()).build();\n            }\n            default -> throw new AwsException(\"InvalidAction\", \"Action \" + action + \" is not supported\", 400);\n        };\n    }\n}\n","sourceCodeStart":90,"sourceCodeEnd":112,"githubUrl":"https://github.com/floci-io/floci/blob/62ff490619e7bd3554597c28c704081b4c15add5/src/main/java/io/github/hectorvent/floci/services/athena/AthenaJsonHandler.java#L90-L112","documentation":"Returned by the Athena emulator's JSON handler when the X-Amz-Target action (or equivalent routing key) is not one of the supported Athena operations. It signals an UnrecognizedOperationException-style gap in the emulator with code InvalidAction and HTTP 400.","triggerScenarios":"Calling any Athena API the emulator has not implemented — e.g. StartCalculationExecution, ListEngineVersions, or a newly introduced AWS Athena action — through a current AWS SDK/CLI version.","commonSituations":"SDK version drift: upgrading the AWS SDK or CLI to a version that emits newer Athena actions while the emulator build lags behind; hand-rolled HTTP clients with a typo in the X-Amz-Target header.","solutions":["Verify the action name is spelled exactly as the AWS API defines (case-sensitive) if calling manually.","Check the emulator's AthenaJsonHandler switch for the list of implemented actions and use only those.","Update the Floci emulator to the latest version — new Athena actions may have been added.","If the action is genuinely missing, open an issue/PR adding the case to AthenaJsonHandler."],"exampleFix":"// before\nPOST / HTTP/1.1\nX-Amz-Target: AmazonAthena.StartCalculationExecutions\n\n// after (use a supported action)\nPOST / HTTP/1.1\nX-Amz-Target: AmazonAthena.StartQueryExecution","handlingStrategy":"fallback","validationCode":"// Check against the emulator's supported action set before calling new Athena APIs\nstatic final Set<String> SUPPORTED = Set.of(\"StartQueryExecution\",\"StopQueryExecution\",\"GetQueryExecution\",\n    \"GetQueryResults\",\"ListQueryExecutions\",\"CreateWorkGroup\",\"DeleteWorkGroup\",\"GetWorkGroup\",\n    \"ListWorkGroups\",\"ListTableMetadata\",\"GetTableMetadata\");\nstatic boolean isSupported(String action) { return SUPPORTED.contains(action); }","typeGuard":null,"tryCatchPattern":"try {\n    return dispatch(action, request);\n} catch (AwsException e) {\n    if (\"InvalidAction\".equals(e.getCode())) {\n        throw new UnsupportedOperationException(\"Athena action not emulated: \" + action, e);\n    }\n    throw e;\n}","preventionTips":["Pin your AWS SDK/CLI version in CI so new Athena actions don't surprise the emulator.","Smoke-test the exact Athena calls your app uses against the emulator in CI.","Contribute missing actions upstream rather than forking request formats."],"tags":["athena","unsupported-action","aws-emulator","sdk-compat"],"backgroundTag":null,"analyzedSha":"62ff490619e7bd3554597c28c704081b4c15add5","analyzedAt":"2026-08-14T14:25:23.764Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}