{"record":{"id":"0063d9d3858417fb","repo":"apache/seatunnel","slug":"unsupported-action-type-actiontype-0063d9","errorCode":null,"errorMessage":"Unsupported action type: ${actionType}","messagePattern":"Unsupported action type: (.+?)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-hbase/src/main/java/org/apache/seatunnel/connectors/seatunnel/hbase/catalog/HbaseCatalog.java","lineNumber":215,"sourceCode":"        options.put(\"config\", ConfigUtil.convertToJsonString(tablePath));\n        return options;\n    }\n\n    @Override\n    public PreviewResult previewAction(\n            ActionType actionType, TablePath tablePath, Optional<CatalogTable> catalogTable) {\n        if (actionType == ActionType.CREATE_TABLE) {\n            return new InfoPreviewResult(\"create index \" + tablePath.getTableName());\n        } else if (actionType == ActionType.DROP_TABLE) {\n            return new InfoPreviewResult(\"delete index \" + tablePath.getTableName());\n        } else if (actionType == ActionType.TRUNCATE_TABLE) {\n            return new InfoPreviewResult(\"delete and create index \" + tablePath.getTableName());\n        } else if (actionType == ActionType.CREATE_DATABASE) {\n            return new InfoPreviewResult(\"create index \" + tablePath.getTableName());\n        } else if (actionType == ActionType.DROP_DATABASE) {\n            return new InfoPreviewResult(\"delete index \" + tablePath.getTableName());\n        } else {\n            throw new UnsupportedOperationException(\"Unsupported action type: \" + actionType);\n        }\n    }\n}\n","sourceCodeStart":197,"sourceCodeEnd":219,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-hbase/src/main/java/org/apache/seatunnel/connectors/seatunnel/hbase/catalog/HbaseCatalog.java#L197-L219","documentation":"HbaseCatalog.previewAction() only implements preview messages for CREATE_TABLE, DROP_TABLE, CREATE_DATABASE and DROP_DATABASE action types. Any other ActionType passed in reaches the final else branch and throws UnsupportedOperationException. This is an internal exhaustiveness guard for catalog operations not supported by the HBase connector.","triggerScenarios":"Calling HbaseCatalog.previewAction() (directly or via catalog preview APIs) with an ActionType outside the four handled values, e.g. RENAME_TABLE, ADD_COLUMN or any newly added ActionType enum constant not yet mapped in HbaseCatalog.","commonSituations":"A new ActionType was added to the SeaTunnel API but the HBase catalog was not updated; a caller reuses a generic catalog preview flow that passes unsupported operations (like rename) to HBase; plugin dispatch logic passes the wrong ActionType.","solutions":["Add a branch for the missing ActionType in previewAction() and return an appropriate InfoPreviewResult","Verify the caller is only passing supported catalog actions to the HBase connector","Upgrade to a SeaTunnel version where the HBase catalog covers the ActionType you need","Wrap the preview call in try-catch and surface a user-friendly 'operation not supported by HBase catalog' message"],"exampleFix":"// before\n} else if (actionType == ActionType.DROP_DATABASE) {\n    return new InfoPreviewResult(\"delete index \" + tablePath.getTableName());\n} else {\n    throw new UnsupportedOperationException(\"Unsupported action type: \" + actionType);\n}\n// after\n} else if (actionType == ActionType.DROP_DATABASE) {\n    return new InfoPreviewResult(\"delete index \" + tablePath.getTableName());\n} else if (actionType == ActionType.RENAME_TABLE) {\n    return new InfoPreviewResult(\"rename table \" + tablePath.getTableName());\n} else {\n    throw new UnsupportedOperationException(\"Unsupported action type: \" + actionType);\n}","handlingStrategy":"validation","validationCode":"java.util.Set<ActionType> SUPPORTED = java.util.Set.of(ActionType.CREATE_TABLE, ActionType.DROP_TABLE, ActionType.CREATE_DATABASE, ActionType.DROP_DATABASE);\nif (!SUPPORTED.contains(actionType)) { throw new IllegalArgumentException(\"HBase catalog does not support: \" + actionType); }\npreviewAction(actionType, tablePath);","typeGuard":"boolean isSupported(ActionType t) {\n    return t == ActionType.CREATE_TABLE || t == ActionType.DROP_TABLE\n        || t == ActionType.CREATE_DATABASE || t == ActionType.DROP_DATABASE;\n}","tryCatchPattern":"try {\n    result = catalog.previewAction(actionType, tablePath);\n} catch (UnsupportedOperationException e) {\n    log.warn(\"HBase catalog cannot preview this action: {}\", e.getMessage());\n}","preventionTips":["Check the connector docs for the catalog operations HBase supports before dispatching","Keep ActionType handling in HbaseCatalog in sync when the API enum gains new constants","Unit-test previewAction against every ActionType constant"],"tags":["unsupported-operation","catalog","hbase"],"backgroundTag":"unsupported-operation","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}