n8n-io/n8n · warning · OperationalError
Missing 'valueGeoCoordinates' for 'withinGeoRange' operator.
Error message
Missing 'valueGeoCoordinates' for 'withinGeoRange' operator.
What it means
OperationalError from buildFilter when operator is 'withingeorange' but valueGeoCoordinates is falsy. withinGeoRange needs a geo coordinate object to build the filter.
Source
Thrown at packages/@n8n/nodes-langchain/nodes/vector_store/VectorStoreWeaviate/Weaviate.utils.ts:116
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}`);
}
throw new OperationalError(`No valid filter value provided for operator: ${operator}`);
}
export function parseCompositeFilter(
filter: WeaviateCompositeFilter | WeaviateFilterUnit,
): FilterValue {
// Handle composite filters (AND/OR)
if (typeof filter === 'object' && ('AND' in filter || 'OR' in filter)) {
if ('AND' in filter) {
return Filters.and(...filter.AND.map(buildFilter));
} else if ('OR' in filter) {View on GitHub (pinned to 5ac6606e81)
Solutions
- Provide valueGeoCoordinates: { operator: 'withinGeoRange', path: ['location'], valueGeoCoordinates: { latitude: 52.5, longitude: 13.4 } } plus any radius the property helper expects.
- Validate the geo object has the required latitude/longitude fields before building the filter.
- Remove the filter if no geo value is available.
Example fix
// before: { operator: 'withinGeoRange', path: ['location'] }
// after: { operator: 'withinGeoRange', path: ['location'], valueGeoCoordinates: { latitude: 52.5, longitude: 13.4 } } Defensive patterns
Strategy: type-guard
Validate before calling
function isValidGeo(g: unknown): boolean { return !!g && ['latitude','longitude'].every(k => typeof (g as any)[k] === 'number'); } if (f.operator.toLowerCase() === 'withingeorange' && !isValidGeo(f.valueGeoCoordinates)) { throw new Error('withinGeoRange requires latitude/longitude'); } Type guard
function isGeoCoordinates(g: unknown): g is { latitude: number; longitude: number } { return !!g && typeof (g as any).latitude === 'number' && typeof (g as any).longitude === 'number'; } Try / catch
try { buildFilter(unit) } catch (e) { if (/valueGeoCoordinates.*withinGeoRange/.test(e.message)) { /* reprompt for geo */ } else throw e; } Prevention
- Validate lat/long ranges (-90..90, -180..180) before building the filter.
- Source geo values from structured fields, not concatenated strings.
- Reject partial geo objects at the UI boundary.
When it happens
Trigger: Filter unit { operator: 'withingeorange', path: [...], /* valueGeoCoordinates missing */ } reaches buildFilter.
Common situations: Geo coordinate object left empty; expression mapped to undefined; JSON filter omitted valueGeoCoordinates; caller passed a malformed/partial geo object that is falsy.
Related errors
- Missing 'valueString' for 'like' operator.
- Missing 'valueTextArray' for 'containsAny' operator.
- Missing 'valueTextArray' for 'containsAll' operator.
- Missing 'valueNumber' for 'greaterThan' operator.
- Missing 'valueNumber' for 'lessThan' operator.
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/da78565c94327f9b.
Report an issue: GitHub.