{"record":{"id":"76b03d05634c237f","repo":"n8n-io/n8n","slug":"unsupported-operator-operator","errorCode":null,"errorMessage":"Unsupported operator: ${operator}","messagePattern":"Unsupported operator: (.+?)","errorType":"exception","errorClass":"OperationalError","httpStatus":null,"severity":"warning","filePath":"packages/@n8n/nodes-langchain/nodes/vector_store/VectorStoreWeaviate/Weaviate.utils.ts","lineNumber":121,"sourceCode":"\t\t\tif (filter.valueNumber === undefined) {\n\t\t\t\tthrow new OperationalError(\"Missing 'valueNumber' for 'lessThan' operator.\");\n\t\t\t}\n\t\t\treturn property.lessThan(filter.valueNumber);\n\n\t\tcase 'isnull':\n\t\t\tif (filter.valueBoolean === undefined) {\n\t\t\t\tthrow new OperationalError(\"Missing 'valueBoolean' for 'isNull' operator.\");\n\t\t\t}\n\t\t\treturn property.isNull(filter.valueBoolean);\n\n\t\tcase 'withingeorange':\n\t\t\tif (!filter.valueGeoCoordinates) {\n\t\t\t\tthrow new OperationalError(\"Missing 'valueGeoCoordinates' for 'withinGeoRange' operator.\");\n\t\t\t}\n\t\t\treturn property.withinGeoRange(filter.valueGeoCoordinates);\n\n\t\tdefault:\n\t\t\tthrow new OperationalError(`Unsupported operator: ${operator}`);\n\t}\n\n\tthrow new OperationalError(`No valid filter value provided for operator: ${operator}`);\n}\n\nexport function parseCompositeFilter(\n\tfilter: WeaviateCompositeFilter | WeaviateFilterUnit,\n): FilterValue {\n\t// Handle composite filters (AND/OR)\n\tif (typeof filter === 'object' && ('AND' in filter || 'OR' in filter)) {\n\t\tif ('AND' in filter) {\n\t\t\treturn Filters.and(...filter.AND.map(buildFilter));\n\t\t} else if ('OR' in filter) {\n\t\t\treturn Filters.or(...filter.OR.map(buildFilter));\n\t\t}\n\t}\n\n\t// Handle individual filter units","sourceCodeStart":103,"sourceCodeEnd":139,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/nodes-langchain/nodes/vector_store/VectorStoreWeaviate/Weaviate.utils.ts#L103-L139","documentation":"OperationalError from buildFilter's default case: the operator string (compared case-insensitively) did not match any supported branch (equal, like, containsany, containsall, greaterthan, lessthan, isnull, withingeorange). The switch cannot build a filter for an unknown operator.","triggerScenarios":"A Weaviate filter unit carries an operator value outside the supported set, e.g. 'not_equal', 'contains', '>=', 'GreaterThan ' (with stray spaces), or a value produced by a typo/expression.","commonSituations":"Typo in operator string; caller used Weaviate-native operator names that n8n does not recognize; version change where a previously-valid operator was removed or renamed; whitespace/case artifacts from string concatenation.","solutions":["Use one of the supported operators: equal, like, containsAny, containsAll, greaterThan, lessThan, isNull, withinGeoRange.","Trim and sanity-check the operator string before building the filter.","If you need an unsupported operator, combine supported ones via a composite AND/OR filter instead.","After an upgrade, re-check the supported operator list in Weaviate.utils.ts."],"exampleFix":"// before: { operator: 'not_equal', path: ['status'], valueString: 'draft' }\n// after:  // weaviate has no not_equal here; invert with a different model field or compose filters","handlingStrategy":"validation","validationCode":"const SUPPORTED = new Set(['equal','like','containsany','containsall','greaterthan','lessthan','isnull','withingeorange']); if (!SUPPORTED.has(f.operator.toLowerCase().trim())) { throw new Error(`Unsupported operator: ${f.operator}`); }","typeGuard":"function isSupportedOperator(op: unknown): op is string { return typeof op === 'string' && new Set(['equal','like','containsany','containsall','greaterthan','lessthan','isnull','withingeorange']).has(op.toLowerCase().trim()); }","tryCatchPattern":"try { buildFilter(unit) } catch (e) { if (/Unsupported operator/.test(e.message)) { /* map to supported operator or drop filter */ } else throw e; }","preventionTips":["Trim and lowercase-compare operator strings before dispatch.","Constrain operator selection in the UI to the supported list.","After dependency upgrades, re-derive the supported set from the utils module."],"tags":["weaviate","filter","validation","operator","unsupported"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}