{"record":{"id":"da78565c94327f9b","repo":"n8n-io/n8n","slug":"missing-valuegeocoordinates-for-withingeorange","errorCode":null,"errorMessage":"Missing 'valueGeoCoordinates' for 'withinGeoRange' operator.","messagePattern":"Missing 'valueGeoCoordinates' for 'withinGeoRange' operator\\.","errorType":"exception","errorClass":"OperationalError","httpStatus":null,"severity":"warning","filePath":"packages/@n8n/nodes-langchain/nodes/vector_store/VectorStoreWeaviate/Weaviate.utils.ts","lineNumber":116,"sourceCode":"\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}\n\n\tthrow new OperationalError(`No valid filter value provided for operator: ${operator}`);\n}\n\nexport function parseCompositeFilter(\n\tfilter: WeaviateCompositeFilter | WeaviateFilterUnit,\n): FilterValue {\n\t// Handle composite filters (AND/OR)\n\tif (typeof filter === 'object' && ('AND' in filter || 'OR' in filter)) {\n\t\tif ('AND' in filter) {\n\t\t\treturn Filters.and(...filter.AND.map(buildFilter));\n\t\t} else if ('OR' in filter) {","sourceCodeStart":98,"sourceCodeEnd":134,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/nodes-langchain/nodes/vector_store/VectorStoreWeaviate/Weaviate.utils.ts#L98-L134","documentation":"OperationalError from buildFilter when operator is 'withingeorange' but valueGeoCoordinates is falsy. withinGeoRange needs a geo coordinate object to build the filter.","triggerScenarios":"Filter unit { operator: 'withingeorange', path: [...], /* valueGeoCoordinates missing */ } reaches buildFilter.","commonSituations":"Geo coordinate object left empty; expression mapped to undefined; JSON filter omitted valueGeoCoordinates; caller passed a malformed/partial geo object that is falsy.","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."],"exampleFix":"// before: { operator: 'withinGeoRange', path: ['location'] }\n// after:  { operator: 'withinGeoRange', path: ['location'], valueGeoCoordinates: { latitude: 52.5, longitude: 13.4 } }","handlingStrategy":"type-guard","validationCode":"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'); }","typeGuard":"function isGeoCoordinates(g: unknown): g is { latitude: number; longitude: number } { return !!g && typeof (g as any).latitude === 'number' && typeof (g as any).longitude === 'number'; }","tryCatchPattern":"try { buildFilter(unit) } catch (e) { if (/valueGeoCoordinates.*withinGeoRange/.test(e.message)) { /* reprompt for geo */ } else throw e; }","preventionTips":["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."],"tags":["weaviate","filter","validation","operator","geo"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}