You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The geocoder.py current checks only for HTTP response 429 "Too many requests" to raise the quota exceeded error. However, for me at least, the code OpenCage sends me is 402 "Payment required". The python module does not detect this alternative code and just gives me empty results list.
Ideal fix would be to make this check more robust - check the JSON as well as the HTTP header. Here is a sample:
"rate":{"limit":2500,"remaining":0,"reset":1439683200},"results":[],"status":{"code":402,"message":"quota exceeded"},
X-RateLimit-Remaining:"0"
Note another handy feature would be the ability to query the geocoder object for the number of calls remaining and the reset time. This would allow the client to prioritise data to be parsed.
The text was updated successfully, but these errors were encountered:
The geocoder.py current checks only for HTTP response 429 "Too many requests" to raise the quota exceeded error. However, for me at least, the code OpenCage sends me is 402 "Payment required". The python module does not detect this alternative code and just gives me empty results list.
Ideal fix would be to make this check more robust - check the JSON as well as the HTTP header. Here is a sample:
"rate":{"limit":2500,"remaining":0,"reset":1439683200},"results":[],"status":{"code":402,"message":"quota exceeded"},
X-RateLimit-Remaining:"0"
Note another handy feature would be the ability to query the geocoder object for the number of calls remaining and the reset time. This would allow the client to prioritise data to be parsed.
The text was updated successfully, but these errors were encountered: