{"record":{"id":"66ae5226cd854970","repo":"opendataloader-project/opendataloader-pdf","slug":"option-s-unsupported-value-s-supported-val","errorCode":null,"errorMessage":"Option --%s: unsupported value '%s'. Supported values: %s, %s","messagePattern":"Option --(.+?): unsupported value '(.+?)'\\. Supported values: (.+?), (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"java/opendataloader-pdf-core/src/main/java/org/opendataloader/pdf/api/cli/CLIOptions.java","lineNumber":713,"sourceCode":"                try {\n                    int timeout = Integer.parseInt(timeoutValue.trim());\n                    config.getHybridConfig().setTimeoutMs(timeout);\n                } catch (NumberFormatException e) {\n                    throw new IllegalArgumentException(\n                            String.format(\"Invalid timeout value '%s'. Must be a non-negative integer.\", timeoutValue));\n                }\n            }\n        }\n        if (commandLine.hasOption(HYBRID_FALLBACK_LONG_OPTION)) {\n            config.getHybridConfig().setFallbackToJava(true);\n        }\n        if (commandLine.hasOption(HYBRID_HANCOM_AI_REGIONLIST_STRATEGY_LONG_OPTION)) {\n            String value = commandLine.getOptionValue(HYBRID_HANCOM_AI_REGIONLIST_STRATEGY_LONG_OPTION);\n            if (value != null && !value.trim().isEmpty()) {\n                String normalized = value.trim().toLowerCase(Locale.ROOT);\n                if (!HybridConfig.REGIONLIST_TABLE_FIRST.equals(normalized)\n                        && !HybridConfig.REGIONLIST_LIST_ONLY.equals(normalized)) {\n                    throw new IllegalArgumentException(String.format(\n                            \"Option --%s: unsupported value '%s'. Supported values: %s, %s\",\n                            HYBRID_HANCOM_AI_REGIONLIST_STRATEGY_LONG_OPTION, normalized,\n                            HybridConfig.REGIONLIST_TABLE_FIRST, HybridConfig.REGIONLIST_LIST_ONLY));\n                }\n                config.getHybridConfig().setRegionlistStrategy(normalized);\n            }\n        }\n        if (commandLine.hasOption(HYBRID_HANCOM_AI_OCR_STRATEGY_LONG_OPTION)) {\n            String value = commandLine.getOptionValue(HYBRID_HANCOM_AI_OCR_STRATEGY_LONG_OPTION);\n            if (value != null && !value.trim().isEmpty()) {\n                String normalized = value.trim().toLowerCase(Locale.ROOT);\n                if (!HybridConfig.OCR_OFF.equals(normalized)\n                        && !HybridConfig.OCR_AUTO.equals(normalized)\n                        && !HybridConfig.OCR_FORCE.equals(normalized)) {\n                    throw new IllegalArgumentException(String.format(\n                            \"Option --%s: unsupported value '%s'. Supported values: %s, %s, %s\",\n                            HYBRID_HANCOM_AI_OCR_STRATEGY_LONG_OPTION, normalized,\n                            HybridConfig.OCR_OFF, HybridConfig.OCR_AUTO, HybridConfig.OCR_FORCE));","sourceCodeStart":695,"sourceCodeEnd":731,"githubUrl":"https://github.com/opendataloader-project/opendataloader-pdf/blob/a7789b8e77dd05e2b8659eb3ea12fc458f80bfb8/java/opendataloader-pdf-core/src/main/java/org/opendataloader/pdf/api/cli/CLIOptions.java#L695-L731","documentation":"Thrown when --hybrid-hancom-ai-regionlist-strategy receives a value that is neither table-first nor list-only. These constants come from HybridConfig (REGIONLIST_TABLE_FIRST, REGIONLIST_LIST_ONLY) and control how DLA label 7 (regionlist) pages are handled: table-first checks table-structure-recognition overlap (default), list-only skips TSR and always treats the region as a list. The option requires --hybrid=hancom-ai.","triggerScenarios":"Pass `--hybrid-hancom-ai-regionlist-strategy both`, `--hybrid-hancom-ai-regionlist-strategy tablefirst` (missing hyphen), or any value besides the two constants. Using this option without --hybrid=hancom-ai is a logic error (silently ignored) even if the value is valid.","commonSituations":"Dropping the hyphen in table-first; guessing a third strategy; setting the strategy while running a non-hancom-ai backend.","solutions":["Use `table-first` or `list-only`.","Ensure `--hybrid=hancom-ai` is also set.","Omit the flag to keep the default (table-first)."],"exampleFix":"// before\nopendataloader-pdf doc.pdf --hybrid hancom-ai --hybrid-hancom-ai-regionlist-strategy tablefirst\n// after\nopendataloader-pdf doc.pdf --hybrid hancom-ai --hybrid-hancom-ai-regionlist-strategy table-first","handlingStrategy":"validation","validationCode":"Set<String> OK = Set.of(HybridConfig.REGIONLIST_TABLE_FIRST, HybridConfig.REGIONLIST_LIST_ONLY);\nString normalized = value.trim().toLowerCase(Locale.ROOT);\nif (!OK.contains(normalized)) {\n    throw new IllegalArgumentException(\"Bad regionlist strategy: \" + value);\n}","typeGuard":"boolean isAcceptableRegionlistStrategy(String v) {\n    String n = v.trim().toLowerCase(Locale.ROOT);\n    return HybridConfig.REGIONLIST_TABLE_FIRST.equals(n) || HybridConfig.REGIONLIST_LIST_ONLY.equals(n);\n}","tryCatchPattern":"try {\n    CLIOptions.applyAllTo(config, cmd);\n} catch (IllegalArgumentException e) {\n    System.err.println(e.getMessage());\n    System.exit(2);\n}","preventionTips":["Use the HybridConfig constants rather than string literals to avoid drift.","Only set this option together with --hybrid=hancom-ai.","Default is table-first; omit the flag unless you need list-only."],"tags":["cli","hybrid","hancom-ai","validation","enum-value"],"backgroundTag":null,"analyzedSha":"a7789b8e77dd05e2b8659eb3ea12fc458f80bfb8","analyzedAt":"2026-08-14T05:22:03.953Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}