-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OVER_DAILY_LIMIT StatusCode not handled, results in ServiceResponseStatus.Unknown #143
Comments
Thats an oversight. Thanks for reporting. Were you running in a tight loop? We've always had plans to try to build an injectable or option for automatically backing off and retry but had some difference of opinions on how to implement. |
That is funny you ask that. I was just looking into building retry logic into my app that uses your library and was looking into the response codes trying to figure out when I should retry and when I should not. I just now started thinking about it, but at first glance it seems UnKnown and OverQueryLimit would be the status to retry on, and optionally retry after a delay, especially for OverQueryLimit. A useful interface to a retry API might look something like this: In the mean time, I'll settle on an extension method:
|
There's more coming on that note. See the https://github.com/ericnewton76/gmaps-api-net/tree/fix/tests-using-snapshots branch (which I need to update with all the changes from base master branch) |
DistanceMatrix documents top level status code OVER_DAILY_LIMIT:
https://developers.google.com/maps/documentation/distance-matrix/intro#StatusCodes
AsResponseStatus doesn't have a case for OVER_DAILY_LIMIT:
https://github.com/ericnewton76/gmaps-api-net/blob/develop/src/Google.Maps/JsonEnumTypeConverter.cs#L26
nor is it represented in the ServiceResponseStatus Enum
https://github.com/ericnewton76/gmaps-api-net/blob/develop/src/Google.Maps/ServiceResponseStatus.cs
The text was updated successfully, but these errors were encountered: