{"record":{"id":"ca5a535be5bd2267","repo":"opendataloader-project/opendataloader-pdf","slug":"option-s-unsupported-value-s-supported-val-ca5a53","errorCode":null,"errorMessage":"Option --%s: unsupported value '%s'. Supported values: %s, %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":728,"sourceCode":"                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));\n                }\n                config.getHybridConfig().setOcrStrategy(normalized);\n            }\n        }\n        if (commandLine.hasOption(HYBRID_HANCOM_AI_IMAGE_CACHE_LONG_OPTION)) {\n            String value = commandLine.getOptionValue(HYBRID_HANCOM_AI_IMAGE_CACHE_LONG_OPTION);\n            if (value != null && !value.trim().isEmpty()) {\n                String normalized = value.trim().toLowerCase(Locale.ROOT);\n                if (!\"memory\".equals(normalized) && !\"disk\".equals(normalized)) {\n                    throw new IllegalArgumentException(String.format(\n                            \"Option --%s: unsupported value '%s'. Supported values: memory, disk\",\n                            HYBRID_HANCOM_AI_IMAGE_CACHE_LONG_OPTION, normalized));\n                }\n                config.getHybridConfig().setImageCache(normalized);\n            }","sourceCodeStart":710,"sourceCodeEnd":746,"githubUrl":"https://github.com/opendataloader-project/opendataloader-pdf/blob/a7789b8e77dd05e2b8659eb3ea12fc458f80bfb8/java/opendataloader-pdf-core/src/main/java/org/opendataloader/pdf/api/cli/CLIOptions.java#L710-L746","documentation":"Thrown when --hybrid-hancom-ai-ocr-strategy receives a value that is not off, auto, or force. Constants come from HybridConfig: OCR_OFF (stream-only), OCR_AUTO (default; stream first, OCR fallback), OCR_FORCE (OCR-only). The option requires --hybrid=hancom-ai. Note this is distinct from the deprecated --hybrid-ocr flag, which only prints a warning and has no effect.","triggerScenarios":"Pass `--hybrid-hancom-ai-ocr-strategy always`, `on`, or a typo like `forc`. Only the three exact tokens are accepted.","commonSituations":"Using synonyms (on/always) instead of the exact tokens; confusing this with the deprecated --hybrid-ocr; typos.","solutions":["Use `off`, `auto`, or `force`.","Ensure `--hybrid=hancom-ai` is set.","Omit the flag to keep the default (auto)."],"exampleFix":"// before\nopendataloader-pdf doc.pdf --hybrid hancom-ai --hybrid-hancom-ai-ocr-strategy always\n// after\nopendataloader-pdf doc.pdf --hybrid hancom-ai --hybrid-hancom-ai-ocr-strategy force","handlingStrategy":"validation","validationCode":"Set<String> OK = Set.of(HybridConfig.OCR_OFF, HybridConfig.OCR_AUTO, HybridConfig.OCR_FORCE);\nString normalized = value.trim().toLowerCase(Locale.ROOT);\nif (!OK.contains(normalized)) {\n    throw new IllegalArgumentException(\"Bad ocr strategy: \" + value);\n}","typeGuard":"boolean isAcceptableOcrStrategy(String v) {\n    String n = v.trim().toLowerCase(Locale.ROOT);\n    return HybridConfig.OCR_OFF.equals(n) || HybridConfig.OCR_AUTO.equals(n) || HybridConfig.OCR_FORCE.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 OCR_* constants, not synonyms like on/always.","Default is auto; omit the flag unless you need off or force.","Do not confuse this with the deprecated --hybrid-ocr flag (which is a no-op)."],"tags":["cli","hybrid","hancom-ai","ocr","validation","enum-value"],"backgroundTag":null,"analyzedSha":"a7789b8e77dd05e2b8659eb3ea12fc458f80bfb8","analyzedAt":"2026-08-14T05:22:03.953Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}