Skip to content
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

Add status code as property of GooglePlacesError #81

Open
nickwilliams-eventbrite opened this issue Oct 21, 2016 · 0 comments
Open

Add status code as property of GooglePlacesError #81

nickwilliams-eventbrite opened this issue Oct 21, 2016 · 0 comments

Comments

@nickwilliams-eventbrite

Currently, if the Google Places API returns a status other than OK or ZERO_RESULTS, the library raises a GooglePlacesError. However, that error simply has the offending status code in the exception message, which makes it hard for consuming code to figure out what happened. status_code should be an attribute of GooglePlacesError.

beamerblvd added a commit to beamerblvd/python-google-places that referenced this issue Oct 21, 2016
Per issue slimkrazy#81, added a new `GooglePlacesAPIError` to allow including `url` and `status_code` attributes that can be used by client code for better error handling. Went the route of a new, extending exception to avoid any issues with extra-party uses of the existing `GooglePlacesError`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant