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

Surface non-200 request errors #855

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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