n8n-io/n8n · warning · OperationalError
Missing 'valueNumber' for 'lessThan' operator.
Error message
Missing 'valueNumber' for 'lessThan' operator.
What it means
buildFilter maps the node's filter configuration onto the Weaviate client API. For operator 'lessThan' the required valueNumber field was not supplied (undefined), so the lessThan clause cannot be constructed and an OperationalError names the missing field.
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.
Example fix
// before: { operator: 'lessThan', path: ['price'] }
// after: { operator: 'lessThan', path: ['price'], valueNumber: 50 } Defensive patterns
Strategy: validation
Validate before calling
if (f.operator.toLowerCase() === 'lessthan' && typeof f.valueNumber !== 'number') { throw new Error("'lessThan' requires a numeric valueNumber"); } Type guard
function isLessThanComplete(f: WeaviateFilterUnit): f is WeaviateFilterUnit & { valueNumber: number } { return f.operator.toLowerCase() === 'lessthan' && typeof f.valueNumber === 'number' && Number.isFinite(f.valueNumber); } Try / catch
try { buildFilter(unit) } catch (e) { if (/valueNumber.*lessThan/.test(e.message)) { /* coerce or reprompt */ } else throw e; } Prevention
- Apply the same numeric validation as greaterThan.
- Reject blank numeric fields at the source.
- Reuse the shared operator→value validator for all numeric operators.
When it happens
Trigger: Filter unit { operator: 'lessthan', path: [...], /* valueNumber missing */ } reaches buildFilter.
Common situations: Blank numeric field; expression resolved undefined/non-number; valueNumber key omitted.
Related errors
- Missing 'valueNumber' for 'greaterThan' operator.
- Missing 'valueBoolean' for 'isNull' operator.
- Missing 'valueGeoCoordinates' for 'withinGeoRange' operator.
- Missing 'valueString' for 'like' operator.
- Missing 'valueTextArray' for 'containsAll' operator.
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/abbb6ef04643c8ba.
Report an issue: GitHub.
Appendix: source
Thrown at packages/@n8n/nodes-langchain/nodes/vector_store/VectorStoreWeaviate/Weaviate.utils.ts:104
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.");
}
return property.withinGeoRange(filter.valueGeoCoordinates);
default:
throw new OperationalError(`Unsupported operator: ${operator}`);
}View on GitHub (pinned to 5ac6606e81)