apache/seatunnel · error · IllegalArgumentException
Option '${valuesAndOptions[index + 1]}' is not valid for the
Error message
Option '${valuesAndOptions[index + 1]}' is not valid for the selected authentication_type What it means
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.
Source
Thrown at seatunnel-connectors-v2/connector-azure-queue-storage/src/main/java/org/apache/seatunnel/connectors/seatunnel/azure/queue/config/AzureQueueConfigValidator.java:91
config.getAccountKey(),
"account_key");
break;
default:
throw new IllegalArgumentException(
"Unsupported authentication_type: " + config.getAuthenticationType());
}
}
static void requireNonBlank(String value, String option) {
if (value == null || value.trim().isEmpty()) {
throw new IllegalArgumentException("Option '" + option + "' cannot be blank");
}
}
private static void rejectPresent(Object... valuesAndOptions) {
for (int index = 0; index < valuesAndOptions.length; index += 2) {
if (valuesAndOptions[index] != null) {
throw new IllegalArgumentException(
"Option '"
+ valuesAndOptions[index + 1]
+ "' is not valid for the selected authentication_type");
}
}
}
}
View on GitHub (pinned to cf67b549a7)
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
Example fix
// before authentication_type = CONNECTION_STRING storage_account_name = "mystorage" // after authentication_type = CONNECTION_STRING connection_string = "DefaultEndpointsProtocol=https;..."
Defensive patterns
Strategy: validation
Validate before calling
java
if (authType == CONNECTION_STRING && config.get("storage_account_name") != null) {
throw new IllegalArgumentException("storage_account_name not valid for CONNECTION_STRING auth");
} Try / catch
java
try {
AzureQueueSourceConfig.from(config);
} catch (IllegalArgumentException e) {
if (e.getMessage().contains("not valid for the selected authentication_type")) {
log.error("Auth-mode mismatch: {}", e.getMessage());
} else { throw e; }
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
- Authentication and authorization failures — expired tokens, bad credentials, and missing scopes.
Related errors
- Option '${option}' cannot be blank
- Option 'field_delimiter' cannot be empty
- Option 'max_in_flight' must be greater than zero
- Option 'operation_timeout_ms' must be greater than zero
- Option 'field_delimiter' cannot be empty
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/f4fe4b0d9b8ebc5e.
Report an issue: GitHub.