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

  1. Provide valueGeoCoordinates: { operator: 'withinGeoRange', path: ['location'], valueGeoCoordinates: { latitude: 52.5, longitude: 13.4 } } plus any radius the property helper expects.
  2. Validate the geo object has the required latitude/longitude fields before building the filter.
  3. 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

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


AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12). Data as JSON: /api/errors/da78565c94327f9b. Report an issue: GitHub.