Skip to content

Surface non-200 request errors - #855

Closed
localjo wants to merge 1 commit into
FaridSafi:masterfrom
localjo:fix-network-errors
Closed

localjo wants to merge 1 commit into
FaridSafi:masterfrom
localjo:fix-network-errors

Conversation

@localjo

@localjo localjo commented Nov 4, 2022

Copy link
Copy Markdown

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
Copy Markdown

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

@bilal1031 bilal1031 closed this Sep 13, 2026
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.

3 participants