googlev3: Add error_message to error checking #398
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello everyone,
First of all, thanks a ton for putting
geopytogether!While playing with the
geocodermodule and setting up GoogleV3 API, I ran into a few issues. The contents oferror_messagehas helped me to debug it much faster and so I believe it would be good to make it part of the exception that it being raised.I am not sure if I followed the standards of the
geopycodebase, so please feel free to point that out and I'd be happy to refactor the PR to reflect it better.Thanks!
GoogleV3 API response contains an
error_messagefield whenstatusisnot
OK. This field contains various complementary information thathelps to debug the issue with the provided geocoder query.
https://developers.google.com/maps/documentation/geocoding/intro#ErrorMessages
This commit adds the content of the
error_messagefield to theGeocoderQueryError exception in cases when
error_messageis providedin the API response and the exception is to be raised.
Signed-off-by: mr.Shu [email protected]