Closed footnote closed 9 years ago
I am getting an ok response when I do it manually and it seems the test cases are passing ok. Can you share the full error with me? Attached is an example of what I get when I run it locally.
Am I doing something wrong in this request? I used the same token that you have passed to me.
I need to know what the response was you got for the above.
Response URL
Response Body
{
"err": {
"name": "MongoError",
"message": "n/a",
"$err": "can't find any special indices: 2d (needs index), 2dsphere (needs index), for: { loc: { $nearSphere: [ 100, 100 ], $maxDistance: 0.7848061528802386 } }",
"code": 13038
},
"clientMsg": "Couldn't perform search :("
}
Response Headers
{
"date": "Thu, 25 Jun 2015 14:18:12 GMT",
"via": "1.1 vegur",
"etag": "W/\"105-70e1d8a4\"",
"server": "Cowboy",
"x-powered-by": "Express",
"access-control-allow-methods": "*",
"content-type": "application/json; charset=utf-8",
"access-control-allow-origin": "*",
"access-control-expose-headers": "*",
"connection": "keep-alive",
"access-control-allow-headers": "*",
"content-length": "261"
}
Response Code 500
OHHHH! I was really confused because you said it was responding with unauthorized. We are looking into this now, I think we have a problem with the database on our end.
This is now fixed. Sorry for the amount of time it took to fix. We thought it was an authorization issue and were looking in the wrong place for the past few days. Let me know if you have any issues with this.
This still responds with unauthorized :(
Response Body
Unauthorized
Response code
401
Response Headers
{
"date": "Sat, 27 Jun 2015 01:28:43 GMT",
"via": "1.1 vegur",
"www-authenticate": "Bearer realm=\"Users\", error=\"invalid_token\"",
"server": "Cowboy",
"x-powered-by": "Express",
"transfer-encoding": "chunked",
"access-control-allow-methods": "*",
"access-control-allow-origin": "*",
"access-control-expose-headers": "*",
"cache-control": "proxy-revalidate",
"access-control-allow-headers": "*"
}
Used tokens 8BY2mPWliL0iMMQeWx (Same token that you have provided earlier) 8QgqB7QzKOKTNVBhW1 (Generated token from the application)
I did it just now. It is working.
You also need to check the auth token is correct. Before using a token you should always authenticate incase the database has changed. Especially for the dev env.
It just happened again!
Request URL
http://lighttribe-dev.herokuapp.com:80/api/v1/posts?radius=30&latitude=100&longitude=100&access_token=QzjJbPhTeZhWr3F3VZ
Response Body
{
"err": {
"name": "MongoError",
"message": "n/a",
"$err": "Legacy point is out of bounds for spherical query",
"code": 17444
},
"clientMsg": "Couldn't perform search :("
}
Response Code 500
Response Headers
{
"date": "Sun, 28 Jun 2015 22:45:08 GMT",
"via": "1.1 vegur",
"etag": "W/\"9e-8a2a38cd\"",
"server": "Cowboy",
"x-powered-by": "Express",
"access-control-allow-methods": "*",
"content-type": "application/json; charset=utf-8",
"access-control-allow-origin": "*",
"access-control-expose-headers": "*",
"connection": "keep-alive",
"access-control-allow-headers": "*",
"content-length": "158"
}
This is probably because you set latitude as 100 when the maximum value for latitude on any spherical system is 90. Try putting in a value less than 90 or greater than -90. Keep in mind that longitude works the same way except with values between -180 and 180. You will notice this is why uimapkit returns values in those formats.
Sent using CloudMagic [https://cloudmagic.com/k/d/mailapp?ct=pi&cv=6.0.64&pv=8.1.3] On Sun, Jun 28, 2015 at 3:50 PM, footnote.consulting notifications@github.com wrote: screen shot 2015-06-29 at 12 45 49 am [https://cloud.githubusercontent.com/assets/7980253/8398677/cd69ae5e-1df8-11e5-86d4-54f1922749e9.png] [https://cloud.githubusercontent.com/assets/7980253/8398677/cd69ae5e-1df8-11e5-86d4-54f1922749e9.png]
— Reply to this email directly or view it on GitHub [https://github.com/codeHatcher/lightTribe/issues/44#issuecomment-116357001] .[https://github.com/notifications/beacon/AFHNVrOu1hFaCoZn6bYmtPrgxExAbO_jks5oYHGygaJpZM4FCsXK.gif]
We received response body which is good step, however we had Unauthorized and Server Error (401 & 500) errors, which will be listened in the failure!
I see where the confusion is coming from. You are looking in the incorrect place for the response. The items you are referring to are potential responses that may be sent. Let me know if that makes sense.
Sent using CloudMagic [https://cloudmagic.com/k/d/mailapp?ct=pi&cv=6.0.64&pv=8.1.3] On Sun, Jun 28, 2015 at 4:45 PM, footnote.consulting notifications@github.com wrote: We received response body which is good step, however we had Unauthorized and Server Error (401 & 500) errors, which will be listened in the failure! screen shot 2015-06-29 at 1 42 38 am [https://cloud.githubusercontent.com/assets/7980253/8398871/7108ddc6-1e00-11e5-9fcb-ac1944816659.png] [https://cloud.githubusercontent.com/assets/7980253/8398871/7108ddc6-1e00-11e5-9fcb-ac1944816659.png]
— Reply to this email directly or view it on GitHub [https://github.com/codeHatcher/lightTribe/issues/44#issuecomment-116361144] .[https://github.com/notifications/beacon/AFHNVsh8BEIXbmn9amfARYby9_CQnb6wks5oYH6RgaJpZM4FCsXK.gif]
Solved!
I found that the timeline is responding with Unauthorized v1/posts