{"record":{"id":"d1f221162b26ea7a","repo":"apache/seatunnel","slug":"unsupported-authentication-type-authenticationt","errorCode":null,"errorMessage":"Unsupported authentication type: ${authenticationType}","messagePattern":"Unsupported authentication type: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-azure-queue-storage/src/main/java/org/apache/seatunnel/connectors/seatunnel/azure/queue/client/AzureQueueClientFactory.java","lineNumber":52,"sourceCode":"        QueueClientBuilder builder =\n                new QueueClientBuilder()\n                        .queueName(config.getQueueName())\n                        .messageEncoding(toAzureEncoding(config.getMessageEncoding()));\n\n        AuthenticationType authenticationType = config.getAuthenticationType();\n        switch (authenticationType) {\n            case CONNECTION_STRING:\n                return builder.connectionString(config.getConnectionString());\n            case SHARED_KEY:\n                return builder.endpoint(config.getEndpoint())\n                        .credential(\n                                new StorageSharedKeyCredential(\n                                        config.getAccountName(), config.getAccountKey()));\n            case SAS_TOKEN:\n                return builder.endpoint(config.getEndpoint())\n                        .sasToken(normalizeSasToken(config.getSasToken()));\n            default:\n                throw new IllegalArgumentException(\n                        \"Unsupported authentication type: \" + authenticationType);\n        }\n    }\n\n    private static QueueMessageEncoding toAzureEncoding(MessageEncoding messageEncoding) {\n        return messageEncoding == MessageEncoding.BASE64\n                ? QueueMessageEncoding.BASE64\n                : QueueMessageEncoding.NONE;\n    }\n\n    private static String normalizeSasToken(String sasToken) {\n        return sasToken.startsWith(\"?\") ? sasToken.substring(1) : sasToken;\n    }\n}\n","sourceCodeStart":34,"sourceCodeEnd":67,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-azure-queue-storage/src/main/java/org/apache/seatunnel/connectors/seatunnel/azure/queue/client/AzureQueueClientFactory.java#L34-L67","documentation":"AzureQueueClientFactory.builder throws IllegalArgumentException when the configured authentication type has no corresponding queue-service client builder branch. The switch only handles CONNECTION_STRING, STORAGE_SHARED_KEY and SAS_TOKEN; any other value (including an unexpected new enum member or a mis-decoded value) reaches the default branch.","triggerScenarios":"builder(...) called with an authenticationType outside the supported switch cases; typically a corrupted/unknown enum value not caught by earlier validation.","commonSituations":"Plugin/connector version mismatch where the enum contains a value this factory doesn't know; custom or typo-derived enum state bypassing validator; upgrading SeaTunnel with old connector jar on classpath.","solutions":["Use one of the supported values: CONNECTION_STRING, STORAGE_SHARED_KEY, or SAS_TOKEN in authentication_type","Ensure connector jar version matches the SeaTunnel version (no mixed jars)","Run the AzureQueueConfigValidator earlier so invalid values are rejected with a clearer message"],"exampleFix":"// before\nauthentication_type = KEYVAULT (unsupported)\n// after\nauthentication_type = SAS_TOKEN (with sas_token set)","handlingStrategy":"validation","validationCode":"EnumSet<AuthType> supported = EnumSet.of(AuthType.CONNECTION_STRING, AuthType.STORAGE_SHARED_KEY, AuthType.SAS_TOKEN);\nif (authType == null || !supported.contains(authType)) {\n  throw new IllegalArgumentException(\"authentication_type must be one of \" + supported);\n}","typeGuard":null,"tryCatchPattern":"try { client = AzureQueueClientFactory.builder(config); } catch (IllegalArgumentException e) { if (e.getMessage().startsWith(\"Unsupported authentication type\")) { log.error(\"Fix authentication_type: {}\", e.getMessage()); } throw e; }","preventionTips":["Only configure CONNECTION_STRING, STORAGE_SHARED_KEY, or SAS_TOKEN","Keep connector and engine jar versions aligned","Rely on the config validator (which runs first) to catch bad enum values early"],"tags":["azure-queue-storage","authentication","unsupported-enum"],"backgroundTag":"unsupported-enum-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}