{"record":{"id":"f4fe4b0d9b8ebc5e","repo":"apache/seatunnel","slug":"option-valuesandoptions-index-1-is-not-val","errorCode":null,"errorMessage":"Option '${valuesAndOptions[index + 1]}' is not valid for the selected authentication_type","messagePattern":"Option '(.+?)' is not valid for the selected 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/config/AzureQueueConfigValidator.java","lineNumber":91,"sourceCode":"                        config.getAccountKey(),\n                        \"account_key\");\n                break;\n            default:\n                throw new IllegalArgumentException(\n                        \"Unsupported authentication_type: \" + config.getAuthenticationType());\n        }\n    }\n\n    static void requireNonBlank(String value, String option) {\n        if (value == null || value.trim().isEmpty()) {\n            throw new IllegalArgumentException(\"Option '\" + option + \"' cannot be blank\");\n        }\n    }\n\n    private static void rejectPresent(Object... valuesAndOptions) {\n        for (int index = 0; index < valuesAndOptions.length; index += 2) {\n            if (valuesAndOptions[index] != null) {\n                throw new IllegalArgumentException(\n                        \"Option '\"\n                                + valuesAndOptions[index + 1]\n                                + \"' is not valid for the selected authentication_type\");\n            }\n        }\n    }\n}\n","sourceCodeStart":73,"sourceCodeEnd":99,"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/config/AzureQueueConfigValidator.java#L73-L99","documentation":"AzureQueueConfigValidator.rejectPresent throws this when an option is supplied that does not apply to the chosen authentication_type (e.g. an account key provided with connection-string auth, or connection_string provided with token auth). It prevents ambiguous or conflicting client credentials.","triggerScenarios":"validateClient detects a non-null value for an option that is only valid for a different authentication_type, e.g. connection_string set while authentication_type=ACCESS_KEY_TOKEN, or storage_account_key set while authentication_type=CONNECTION_STRING.","commonSituations":"Migrating between auth modes and leaving the old option behind; copying a full example config that includes options for multiple auth types; CI templates injecting credentials for the wrong auth mode.","solutions":["Remove the option named in the message, or switch authentication_type to the one that uses it","Audit the config so only the options required by the selected authentication_type are present","Use a minimal example config for the intended auth mode instead of a merged one","Check config templating/secret injection for leftovers from a previous auth mode"],"exampleFix":"// before\nauthentication_type = CONNECTION_STRING\nstorage_account_name = \"mystorage\"\n// after\nauthentication_type = CONNECTION_STRING\nconnection_string = \"DefaultEndpointsProtocol=https;...\"","handlingStrategy":"validation","validationCode":"java\nif (authType == CONNECTION_STRING && config.get(\"storage_account_name\") != null) {\n    throw new IllegalArgumentException(\"storage_account_name not valid for CONNECTION_STRING auth\");\n}","typeGuard":null,"tryCatchPattern":"java\ntry {\n    AzureQueueSourceConfig.from(config);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().contains(\"not valid for the selected authentication_type\")) {\n        log.error(\"Auth-mode mismatch: {}\", e.getMessage());\n    } else { throw e; }\n}","preventionTips":["Maintain one config template per authentication_type","Remove unused credential options when switching auth modes","Grep the final rendered config for stray auth options before submit"],"tags":["config","validation","azure","authentication"],"backgroundTag":"conflicting-config-options","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}