apache/beam · error · java.lang.IllegalArgumentException
Unsupported debugMode '" + value + "'. Supported values are…
Error message
Unsupported debugMode '" + value + "'. Supported values are ERROR and INFO.
What it means
parseStreamingLogLevel converts a user-supplied debugMode string into the StreamingLogLevel enum via valueOf. Any string not exactly matching an enum constant (ERROR or INFO) fails and is rethrown as an IllegalArgumentException naming the bad value and the allowed ones.
Solutions
- Pass exactly "ERROR" or "INFO".
- Trim and uppercase the input before parsing: value.trim().toUpperCase(Locale.ROOT).
- Wrap parsing in a try-catch if the value comes from user config.
Example fix
// before
parseStreamingLogLevel("debug")
// after
parseStreamingLogLevel("INFO") Defensive patterns
Strategy: validation
Validate before calling
Set<StreamingLogLevel> valid = EnumSet.allOf(StreamingLogLevel.class);
if (!valid.contains(StreamingLogLevel.valueOf(value.trim().toUpperCase(Locale.ROOT)))) { /* reject */ } Try / catch
try { level = SnowflakeSchemaTransformUtils.parseStreamingLogLevel(cfg.debugMode()); }
catch (IllegalArgumentException e) { level = StreamingLogLevel.INFO; log.warn(e.getMessage()); } Prevention
- Use the enum constant instead of raw strings where the API allows.
- Normalize config strings (trim + uppercase) before parsing.
- List accepted values in your config schema/documentation.
When it happens
Trigger: Passing any string other than "ERROR" or "INFO" (case-sensitive, e.g. "error", "debug", "WARN") to parseStreamingLogLevel when configuring Snowflake streaming transforms.
Common situations: Using lowercase log level names; using levels from other logging frameworks (WARN, DEBUG); whitespace or trailing newline from env/config parsing.
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 createDisposition '" + value + "'. Supported…
- Unsupported writeDisposition '" + value + "'. Supported…
- Invalid boolean value
- Unable to parse value
- Aliased enumerations not currently supported.
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/e309fb8d4a3c711e.
Report an issue: GitHub.
Appendix: source
Thrown at sdks/java/io/snowflake/src/main/java/org/apache/beam/sdk/io/snowflake/SnowflakeSchemaTransformUtils.java:129
throw new IllegalArgumentException(
"username is required for password and private key authentication.");
}
if (isNotEmpty(privateKeyPassphrase) && !isNotEmpty(privateKey)) {
throw new IllegalArgumentException("privateKeyPassphrase requires privateKey.");
}
}
@EnsuresNonNullIf(expression = "#1", result = true)
public static boolean isNotEmpty(@Nullable String value) {
return value != null && !value.isEmpty();
}
public static StreamingLogLevel parseStreamingLogLevel(String value) {
try {
return StreamingLogLevel.valueOf(value);
} catch (IllegalArgumentException e) {
throw new IllegalArgumentException(
"Unsupported debugMode '" + value + "'. Supported values are ERROR and INFO.", e);
}
}
public static CreateDisposition parseCreateDisposition(String value) {
try {
return CreateDisposition.valueOf(value);
} catch (IllegalArgumentException e) {
throw new IllegalArgumentException(
"Unsupported createDisposition '"
+ value
+ "'. Supported values are CREATE_IF_NEEDED and CREATE_NEVER.",
e);
}
}
public static WriteDisposition parseWriteDisposition(String value) {
try {View on GitHub (pinned to 12126d8942)