n8n-io/n8n · warning · OperationalError
Missing 'valueNumber' for 'greaterThan' operator.
Error message
Missing 'valueNumber' for 'greaterThan' operator.
What it means
OperationalError from buildFilter when operator is 'greaterthan' but valueNumber is undefined. Greater-than requires a numeric comparison operand.
Source
Thrown at packages/@n8n/nodes-langchain/nodes/vector_store/VectorStoreWeaviate/Weaviate.utils.ts:98
throw new OperationalError("Missing 'valueString' for 'like' operator.");
}
return property.like(filter.valueString);
case 'containsany':
if (filter.valueTextArray === undefined) {
throw new OperationalError("Missing 'valueTextArray' for 'containsAny' operator.");
}
return property.containsAny(filter.valueTextArray);
case 'containsall':
if (filter.valueTextArray === undefined) {
throw new OperationalError("Missing 'valueTextArray' for 'containsAll' operator.");
}
return property.containsAll(filter.valueTextArray);
case 'greaterthan':
if (filter.valueNumber === undefined) {
throw new OperationalError("Missing 'valueNumber' for 'greaterThan' operator.");
}
return property.greaterThan(filter.valueNumber);
case 'lessthan':
if (filter.valueNumber === undefined) {
throw new OperationalError("Missing 'valueNumber' for 'lessThan' operator.");
}
return property.lessThan(filter.valueNumber);
case 'isnull':
if (filter.valueBoolean === undefined) {
throw new OperationalError("Missing 'valueBoolean' for 'isNull' operator.");
}
return property.isNull(filter.valueBoolean);
case 'withingeorange':
if (!filter.valueGeoCoordinates) {
throw new OperationalError("Missing 'valueGeoCoordinates' for 'withinGeoRange' operator.");View on GitHub (pinned to 5ac6606e81)
Solutions
- Provide valueNumber: { operator: 'greaterThan', path: ['price'], valueNumber: 100 }.
- Ensure the source expression yields a number (coerce with Number(...) or an explicit cast).
- Remove the filter if no numeric bound applies.
Example fix
// before: { operator: 'greaterThan', path: ['price'] }
// after: { operator: 'greaterThan', path: ['price'], valueNumber: 100 } Defensive patterns
Strategy: validation
Validate before calling
if (f.operator.toLowerCase() === 'greaterthan' && typeof f.valueNumber !== 'number') { throw new Error("'greaterThan' requires a numeric valueNumber"); } Type guard
function isGreaterThanComplete(f: WeaviateFilterUnit): f is WeaviateFilterUnit & { valueNumber: number } { return f.operator.toLowerCase() === 'greaterthan' && typeof f.valueNumber === 'number' && Number.isFinite(f.valueNumber); } Try / catch
try { buildFilter(unit) } catch (e) { if (/valueNumber.*greaterThan/.test(e.message)) { /* coerce or reprompt */ } else throw e; } Prevention
- Coerce numeric inputs with Number(...) and reject NaN before building filters.
- Pair every numeric operator with a number-typed input control in the UI.
- Unit-test filter builders against missing/typed-wrong values.
When it happens
Trigger: Filter unit { operator: 'greaterthan', path: [...], /* valueNumber missing */ } reaches buildFilter.
Common situations: Numeric value left blank in the UI; expression mapped to a non-numeric or undefined value; JSON filter omitted valueNumber.
Related errors
- Missing 'valueNumber' for 'lessThan' operator.
- Missing 'valueString' for 'like' operator.
- Missing 'valueTextArray' for 'containsAny' operator.
- Missing 'valueTextArray' for 'containsAll' operator.
- Missing 'valueBoolean' for 'isNull' operator.
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/7dc4e35704f9f60f.
Report an issue: GitHub.