{"record":{"id":"0babaa8388260166","repo":"OtterMind/Chat2DB","slug":"invalid-oracle-index-sort-direction-value","errorCode":null,"errorMessage":"Invalid Oracle index sort direction: {value}","messagePattern":"Invalid Oracle index sort direction: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"chat2db-community-server/chat2db-community-plugins/chat2db-community-oracle/src/main/java/ai/chat2db/plugin/oracle/OracleSqlGuards.java","lineNumber":74,"sourceCode":"    }\n\n    public static String requireUnit(String unit) {\n        String trimmed = StringUtils.trimToEmpty(unit);\n        if (!\"CHAR\".equalsIgnoreCase(trimmed) && !\"BYTE\".equalsIgnoreCase(trimmed)) {\n            throw new IllegalArgumentException(\"Unsupported Oracle VARCHAR unit: \" + unit);\n        }\n        return trimmed;\n    }\n\n    public static String requireAscOrDesc(String value) {\n        String trimmed = StringUtils.trimToEmpty(value);\n        if (\"ASC\".equalsIgnoreCase(trimmed)) {\n            return \"ASC\";\n        }\n        if (\"DESC\".equalsIgnoreCase(trimmed)) {\n            return \"DESC\";\n        }\n        throw new IllegalArgumentException(\"Invalid Oracle index sort direction: \" + value);\n    }\n\n    /**\n     * Returns the raw hex digits represented by {@code value}. Non-hex input is\n     * replaced with the caller-provided base16 encoding, which is verified too.\n     */\n    public static String normalizeHexLiteral(String value, String fallbackHex) {\n        if (value == null) {\n            return null;\n        }\n        String candidate = value.startsWith(\"0x\") ? value.substring(2) : value;\n        if (isHex(candidate)) {\n            return candidate;\n        }\n        if (fallbackHex != null && isHex(fallbackHex)) {\n            return fallbackHex;\n        }\n        throw new IllegalArgumentException(\"Invalid Oracle RAW/BLOB hex value\");","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/OtterMind/Chat2DB/blob/5ee1e990e73fbcae1969dc554be254fedb3ab888/chat2db-community-server/chat2db-community-plugins/chat2db-community-oracle/src/main/java/ai/chat2db/plugin/oracle/OracleSqlGuards.java#L56-L92","documentation":"Error \"Invalid Oracle index sort direction: {value}\" thrown in OtterMind/Chat2DB.","triggerScenarios":"An Oracle index definition contained an unrecognized sort direction.","commonSituations":"See trigger scenarios.","solutions":["Use ASC or DESC as the index column sort direction."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5ee1e990e73fbcae1969dc554be254fedb3ab888","analyzedAt":"2026-08-14T07:05:03.077Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}