{"record":{"id":"2fec095a76533d16","repo":"OtterMind/Chat2DB","slug":"invalid-postgresql-bytea-hex-literal-value","errorCode":null,"errorMessage":"Invalid PostgreSQL bytea hex literal: ${value}","messagePattern":"Invalid PostgreSQL bytea hex literal: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"chat2db-community-server/chat2db-community-plugins/chat2db-community-postgresql/src/main/java/ai/chat2db/plugin/postgresql/PostgreSqlGuards.java","lineNumber":183,"sourceCode":"        return storageClause;\n    }\n\n    /**\n     * Validate content of a B'...' bit literal.\n     */\n    public static String requireBitLiteral(String value) {\n        if (value == null || !BIT_LITERAL_PATTERN.matcher(value).matches()) {\n            throw new IllegalArgumentException(\"Invalid PostgreSQL bit literal: \" + value);\n        }\n        return value;\n    }\n\n    /**\n     * Validate content of a \\x... bytea hex literal.\n     */\n    public static String requireHexLiteral(String value) {\n        if (value == null || !HEX_LITERAL_PATTERN.matcher(value).matches()) {\n            throw new IllegalArgumentException(\"Invalid PostgreSQL bytea hex literal: \" + value);\n        }\n        return value;\n    }\n\n    /**\n     * Validate an option that must be one of the given enum constants (e.g. view check option).\n     * Returns the canonical enum name.\n     */\n    public static <E extends Enum<E>> String requireEnumConstant(String value, E[] constants, String what) {\n        for (E constant : constants) {\n            if (constant.name().equalsIgnoreCase(StringUtils.trimToEmpty(value))) {\n                return constant.name();\n            }\n        }\n        throw new IllegalArgumentException(\"Invalid PostgreSQL \" + what + \": \" + value);\n    }\n\n    private static void scanDefaultExpression(String expression) {","sourceCodeStart":165,"sourceCodeEnd":201,"githubUrl":"https://github.com/OtterMind/Chat2DB/blob/5ee1e990e73fbcae1969dc554be254fedb3ab888/chat2db-community-server/chat2db-community-plugins/chat2db-community-postgresql/src/main/java/ai/chat2db/plugin/postgresql/PostgreSqlGuards.java#L165-L201","documentation":"Error \"Invalid PostgreSQL bytea hex literal: ${value}\" thrown in OtterMind/Chat2DB.","triggerScenarios":"A PostgreSQL bytea hex literal was malformed.","commonSituations":"See trigger scenarios.","solutions":["Provide an even-length hexadecimal string for the bytea literal, e.g. '\\xDEADBEEF'."],"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"}