Skip to content

Conversation

localjo
Copy link

@localjo localjo commented Nov 4, 2022

Currently, if a request to the Google Places API fails with a non-200 status code, there is no console warning, and the onFail callback is not called. This PR fixes that, so that the errors can be surfaced.

An example case is if requestUrl uses the Google API without a proxy, or if the proxy does not have allow-origin CORS headers, then the request fails with a 403, forbidden status. Currently, those cases fail silently, so this PR fixes that, allowing users to specify an error handler and surface the error.

@tylerlaskey
Copy link

+1, would like the ability to pass an onFail prop that will be called if non-200 is returned! @FaridSafi

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

Successfully merging this pull request may close these issues.

2 participants