These are chat archives for Automattic/mongoose

20th
Oct 2018
Kev
@lineus
Oct 20 2018 09:03
@chaiwa-berian did you figure out the answer to your first question?
karunalladeva
@karunalladeva
Oct 20 2018 12:55
Hi
How to find near by location ...
karunalladeva
@karunalladeva
Oct 20 2018 13:14
{
"status": "400",
"message": {
"ok": 0,
"errmsg": "error processing query: ns=me.servicelistsTree: GEONEAR field=loc maxdist=500 isNearSphere=0\nSort: {}\nProj: {}\n planner returned error: unable to find index for $geoNear query",
"code": 2,
"codeName": "BadValue",
"operationTime": "6614426734521483266",
"$clusterTime": {
"clusterTime": "6614426734521483266",
"signature": {
"hash": "tL0OxHPzxJlWsndU3CxmdUIHPxg=",
"keyId": "6605489753687064577"
}
},
"name": "MongoError"
}
}
this is my problem..
Berian
@chaiwa-berian
Oct 20 2018 15:54
@chaiwa-berian did you figure out the answer to your first question? Yes I did. I had to remove the catch() from each one those and then wrap the whole code in one try-catch and then call next only once in the catch. All looks good and works as expected, but I haven't solved the second question yet!
@lineus