{"record":{"id":"fc05b37a96a4cbba","repo":"apache/flink","slug":"unsupported-value-s-for-option-s-supported-va","errorCode":null,"errorMessage":"Unsupported value '%s' for option %s. Supported values are %s.","messagePattern":"Unsupported value '(.+?)' for option (.+?)\\. Supported values are (.+?)\\.","errorType":"validation","errorClass":"ValidationException","httpStatus":null,"severity":"error","filePath":"flink-formats/flink-json/src/main/java/org/apache/flink/formats/json/JsonFormatOptionsUtil.java","lineNumber":125,"sourceCode":"        if (ignoreParseErrors && failOnMissingField) {\n            throw new ValidationException(\n                    FAIL_ON_MISSING_FIELD.key()\n                            + \" and \"\n                            + IGNORE_PARSE_ERRORS.key()\n                            + \" shouldn't both be true.\");\n        }\n        validateTimestampFormat(tableOptions);\n    }\n\n    /** Validator for json encoding format. */\n    public static void validateEncodingFormatOptions(ReadableConfig tableOptions) {\n        // validator for {@link MAP_NULL_KEY_MODE}\n        Set<String> nullKeyModes =\n                Arrays.stream(JsonFormatOptions.MapNullKeyMode.values())\n                        .map(Objects::toString)\n                        .collect(Collectors.toSet());\n        if (!nullKeyModes.contains(tableOptions.get(MAP_NULL_KEY_MODE).toUpperCase())) {\n            throw new ValidationException(\n                    String.format(\n                            \"Unsupported value '%s' for option %s. Supported values are %s.\",\n                            tableOptions.get(MAP_NULL_KEY_MODE),\n                            MAP_NULL_KEY_MODE.key(),\n                            nullKeyModes));\n        }\n        validateTimestampFormat(tableOptions);\n    }\n\n    /** Validates timestamp format which value should be SQL or ISO-8601. */\n    static void validateTimestampFormat(ReadableConfig tableOptions) {\n        String timestampFormat = tableOptions.get(TIMESTAMP_FORMAT);\n        if (!TIMESTAMP_FORMAT_ENUM.contains(timestampFormat)) {\n            throw new ValidationException(\n                    String.format(\n                            \"Unsupported value '%s' for %s. Supported values are [SQL, ISO-8601].\",\n                            timestampFormat, TIMESTAMP_FORMAT.key()));\n        }","sourceCodeStart":107,"sourceCodeEnd":143,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-formats/flink-json/src/main/java/org/apache/flink/formats/json/JsonFormatOptionsUtil.java#L107-L143","documentation":"ValidationException from validateEncodingFormatOptions when 'map-null-key.mode' is not one of the JsonFormatOptions.MapNullKeyMode enum names (FAIL, DROP, LITERAL). Checked against the exact enum name set (upper-case), so lowercase values also fail here since the comparison uses .toUpperCase() on the config value before matching the enum-name set.","triggerScenarios":"CREATE TABLE with 'json.map-null-key.mode' set to an unknown value in an encoding (sink) context; programmatic config without validation.","commonSituations":"Typos ('faill', 'ignore', 'null'); assuming another connector's option vocabulary; custom factory skipping the encoding validator.","solutions":["Use 'FAIL', 'DROP', or 'LITERAL' for 'json.map-null-key.mode'","If LITERAL, also set a valid 'json.map-null-key.literal' value","Let the DDL path run the validator to catch typos at CREATE time"],"exampleFix":"-- before\n'json.map-null-key.mode' = 'ignore'\n\n-- after\n'json.map-null-key.mode' = 'DROP'","handlingStrategy":"validation","validationCode":"JsonFormatOptionsUtil.validateEncodingFormatOptions(tableOptions);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy option values from the official JSON format docs page","Automate DDL linting against supported value sets"],"tags":["flink","json","options","map","sink","validation"],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}