apache/seatunnel · error · IllegalArgumentException
Unsupported auth type: %s, supported: %s
Error message
Unsupported auth type: %s, supported: %s
What it means
EdgeSocketAuthType.from() converts a user-supplied auth config string into the EdgeSocketAuthType enum. When the string does not match any known auth type value, the method throws IllegalArgumentException listing all supported values. This is a fail-fast config validation so a typo never silently disables authentication.
Source
Thrown at seatunnel-connectors-v2/connector-edge-socket/src/main/java/org/apache/seatunnel/connectors/seatunnel/edgesocket/config/EdgeSocketAuthType.java:49
private final String value;
EdgeSocketAuthType(String value) {
this.value = value;
}
public static EdgeSocketAuthType from(String authType) {
Objects.requireNonNull(authType, "authType must not be null");
String normalized = authType.trim().toLowerCase(Locale.ROOT);
for (EdgeSocketAuthType type : values()) {
if (type.getValue().equals(normalized) || type.name().equalsIgnoreCase(normalized)) {
return type;
}
}
String supported =
Arrays.stream(values())
.map(EdgeSocketAuthType::getValue)
.collect(Collectors.joining(", "));
throw new IllegalArgumentException(
"Unsupported auth type: " + authType + ", supported: " + supported);
}
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Read the 'supported: ...' portion of the message and set the auth config option to exactly one of the listed values.
- Check for case or whitespace issues (trim the value, match exact casing).
- If migrating from another connector, map the old auth name to the edge-socket supported value.
Example fix
// before auth_type = "basicauth" // after auth_type = "basic"
Defensive patterns
Strategy: validation
Validate before calling
Set<String> valid = Arrays.stream(EdgeSocketAuthType.values()).map(EdgeSocketAuthType::getValue).collect(Collectors.toSet());
if (authType == null || !valid.contains(authType.trim())) {
throw new IllegalArgumentException("auth_type must be one of " + valid);
} Prevention
- Copy auth values directly from the connector documentation, not from memory.
- Validate the edge-socket config with a startup dry run before deploying.
- Keep auth type strings lowercase and free of whitespace in config files.
When it happens
Trigger: Calling EdgeSocketAuthType.from(authType) with a blank, misspelled, or wrong-cased auth type string from the connector config (e.g. 'basicauth' instead of the defined value).
Common situations: Typos in the HOCON/YAML config for the edge-socket source auth option, copying config from another connector whose auth names differ, or an uppercase/case mismatch since matching is typically case-sensitive.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Unsupported packet mode: %s, supported: %s
- Unknown format type:
- not support this type of bufferType: ${bufferType}
- COMMON_ILLEGAL_ARGUMENT
- Unsupported compression type: %s, supported: %s
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/45b0729ec9adf17d.
Report an issue: GitHub.