{"record":{"id":"d4005aa94153dfb1","repo":"appsmithorg/appsmith","slug":"pe-uqi-5000","errorCode":"PE-UQI-5000","errorMessage":"{} is not a known conditional operator. Please reach out to Appsmith customer support to report this","messagePattern":"(.+?) is not a known conditional operator\\. Please reach out to Appsmith customer support to report this","errorType":"error_code","errorClass":"AppsmithPluginException","httpStatus":500,"severity":"error","filePath":"app/server/appsmith-interfaces/src/main/java/com/appsmith/external/helpers/PluginUtils.java","lineNumber":370,"sourceCode":"    }\n\n    public static Condition parseWhereClause(Map<String, Object> whereClause) {\n        // Only proceed if this is a valid condition\n        if (whereClause == null || !(whereClause.containsKey(KEY) || whereClause.containsKey(CHILDREN))) {\n            return null;\n        }\n        Condition condition = new Condition();\n\n        Object unparsedOperator = whereClause.getOrDefault(CONDITION, ConditionalOperator.EQ.name());\n\n        ConditionalOperator operator;\n        try {\n            operator = ConditionalOperator.valueOf(\n                    ((String) unparsedOperator).trim().toUpperCase());\n        } catch (IllegalArgumentException e) {\n            // The operator could not be cast into a known type. Throw an exception\n            log.error(e.getMessage());\n            throw new AppsmithPluginException(AppsmithPluginError.PLUGIN_UQI_WHERE_CONDITION_UNKNOWN, unparsedOperator);\n        }\n\n        condition.setOperator(operator);\n\n        // For logical operators, we must walk all the children and add the same as values to this condition\n        if (operator.equals(ConditionalOperator.AND) || operator.equals(ConditionalOperator.OR)) {\n            List<Condition> children = new ArrayList<>();\n            List<Map<String, Object>> conditionList = (List) whereClause.get(CHILDREN);\n            for (Map<String, Object> unparsedCondition : conditionList) {\n                Condition childCondition = parseWhereClause(unparsedCondition);\n                if (childCondition != null) {\n                    children.add(childCondition);\n                }\n            }\n            if (!children.isEmpty()) {\n                condition.setValue(children);\n            }\n        } else {","sourceCodeStart":352,"sourceCodeEnd":388,"githubUrl":"https://github.com/appsmithorg/appsmith/blob/8cd9021c24cdbea1c3c12c966073708e83db60c2/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/helpers/PluginUtils.java#L352-L388","documentation":"Thrown by PluginUtils.parseWhereClause when the 'condition' field of a UQI where-clause map cannot be mapped to a ConditionalOperator enum value. ConditionalOperator.valueOf is invoked on the trimmed, upper-cased string; any value that is not exactly one of EQ, NOT_EQ, LT, LTE, GT, GTE, CONTAINS, IN, NOT_IN, AND, OR (and any others declared on the enum) raises IllegalArgumentException, which is caught and re-thrown as PLUGIN_UQI_WHERE_CONDITION_UNKNOWN with the offending operator string as the argument.","triggerScenarios":"A plugin action (e.g. a UQI-based query like S3, Firestore, Google Sheets) submits a whereClause whose 'condition' key holds a string that is not a known ConditionalOperator - e.g. 'equals', 'is', 'containsExactly', an empty string, a typo like 'CONTAIN', or a localized/translated operator name. Also occurs when a frontend sends a numeric or null value, which fails the (String) cast before reaching the enum lookup.","commonSituations":"Hand-authored JSON filter payloads that use SQL-style operators (=, <>) instead of Appsmith operator names; copy/paste from documentation that uses a different operator vocabulary; upgrading Appsmith and relying on an operator that was renamed or removed; client-side dropdown that accidentally submits a label rather than its value.","solutions":["Check the value of whereClause['condition'] in the request payload - it must be one of the ConditionalOperator enum names (case-insensitive).","Replace synonyms with the canonical enum name (e.g. 'equals' -> 'EQ', 'not equal' -> 'NOT_EQ', 'less than' -> 'LT').","If you need a custom operator, ensure the frontend submits the exact enum string and not a display label.","Wrap dynamic operator input in a whitelist check against ConditionalOperator.values() before sending the request."],"exampleFix":"// before\noperator = ConditionalOperator.valueOf(\n    ((String) unparsedOperator).trim().toUpperCase());\n\n// after - validate against the known enum set\nString normalized = ((String) unparsedOperator).trim().toUpperCase();\nConditionalOperator operator = Arrays.stream(ConditionalOperator.values())\n    .filter(op -> op.name().equals(normalized))\n    .findFirst()\n    .orElseThrow(() -> new AppsmithPluginException(\n        AppsmithPluginError.PLUGIN_UQI_WHERE_CONDITION_UNKNOWN,\n        unparsedOperator));","handlingStrategy":"validation","validationCode":"public static boolean isKnownOperator(String raw) {\n    if (raw == null) return false;\n    String normalized = raw.trim().toUpperCase();\n    return Arrays.stream(ConditionalOperator.values())\n        .map(ConditionalOperator::name)\n        .anyMatch(normalized::equals);\n}\n\n// guard before calling parseWhereClause\nif (!isKnownOperator((String) whereClause.get(CONDITION))) {\n    // reject or default to EQ\n    whereClause.put(CONDITION, ConditionalOperator.EQ.name());\n}","typeGuard":"public static ConditionalOperator safeOperator(Object raw) {\n    if (!(raw instanceof String)) return null;\n    String n = ((String) raw).trim().toUpperCase();\n    return Arrays.stream(ConditionalOperator.values())\n        .filter(op -> op.name().equals(n))\n        .findFirst()\n        .orElse(null);\n}","tryCatchPattern":"try {\n    Condition c = PluginUtils.parseWhereClause(whereClause);\n} catch (AppsmithPluginException e) {\n    if (e.getError() == AppsmithPluginError.PLUGIN_UQI_WHERE_CONDITION_UNKNOWN) {\n        // fallback: drop the offending clause or default to EQ\n        log.warn(\"Unknown operator in clause, skipping: {}\", whereClause);\n        return null;\n    }\n    throw e;\n}","preventionTips":["Frontend dropdowns should submit the enum value, not the display label.","Whitelist operators server-side before reaching parseWhereClause.","Treat operator input as untrusted; never pass it straight to valueOf."],"tags":["uqi","filter","where-clause","operator","enum"],"backgroundTag":null,"analyzedSha":"8cd9021c24cdbea1c3c12c966073708e83db60c2","analyzedAt":"2026-08-12T22:14:19.293Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}