{"record":{"id":"abbb6ef04643c8ba","repo":"n8n-io/n8n","slug":"missing-valuenumber-for-lessthan-operator","errorCode":null,"errorMessage":"Missing 'valueNumber' for 'lessThan' operator.","messagePattern":"Missing 'valueNumber' for 'lessThan' operator\\.","errorType":"exception","errorClass":"OperationalError","httpStatus":null,"severity":"warning","filePath":"packages/@n8n/nodes-langchain/nodes/vector_store/VectorStoreWeaviate/Weaviate.utils.ts","lineNumber":104,"sourceCode":"\t\t\t\tthrow new OperationalError(\"Missing 'valueTextArray' for 'containsAny' operator.\");\n\t\t\t}\n\t\t\treturn property.containsAny(filter.valueTextArray);\n\n\t\tcase 'containsall':\n\t\t\tif (filter.valueTextArray === undefined) {\n\t\t\t\tthrow new OperationalError(\"Missing 'valueTextArray' for 'containsAll' operator.\");\n\t\t\t}\n\t\t\treturn property.containsAll(filter.valueTextArray);\n\n\t\tcase 'greaterthan':\n\t\t\tif (filter.valueNumber === undefined) {\n\t\t\t\tthrow new OperationalError(\"Missing 'valueNumber' for 'greaterThan' operator.\");\n\t\t\t}\n\t\t\treturn property.greaterThan(filter.valueNumber);\n\n\t\tcase 'lessthan':\n\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}","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/nodes-langchain/nodes/vector_store/VectorStoreWeaviate/Weaviate.utils.ts#L86-L122","documentation":"OperationalError from buildFilter when operator is 'lessthan' but valueNumber is undefined. Symmetric to greaterThan.","triggerScenarios":"Filter unit { operator: 'lessthan', path: [...], /* valueNumber missing */ } reaches buildFilter.","commonSituations":"Blank numeric field; expression resolved undefined/non-number; valueNumber key omitted.","solutions":["Provide valueNumber: { operator: 'lessThan', path: ['price'], valueNumber: 50 }.","Coerce the source to a number before building the filter.","Drop the filter unit if not applicable."],"exampleFix":"// before: { operator: 'lessThan', path: ['price'] }\n// after:  { operator: 'lessThan', path: ['price'], valueNumber: 50 }","handlingStrategy":"validation","validationCode":"if (f.operator.toLowerCase() === 'lessthan' && typeof f.valueNumber !== 'number') { throw new Error(\"'lessThan' requires a numeric valueNumber\"); }","typeGuard":"function isLessThanComplete(f: WeaviateFilterUnit): f is WeaviateFilterUnit & { valueNumber: number } { return f.operator.toLowerCase() === 'lessthan' && typeof f.valueNumber === 'number' && Number.isFinite(f.valueNumber); }","tryCatchPattern":"try { buildFilter(unit) } catch (e) { if (/valueNumber.*lessThan/.test(e.message)) { /* coerce or reprompt */ } else throw e; }","preventionTips":["Apply the same numeric validation as greaterThan.","Reject blank numeric fields at the source.","Reuse the shared operator→value validator for all numeric operators."],"tags":["weaviate","filter","validation","operator","number"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}