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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

onError will be now also called when there is a route request error. #124

Closed
wants to merge 1 commit into from
Closed

Conversation

AntonioRedondo
Copy link

@AntonioRedondo AntonioRedondo commented Feb 12, 2020

Hi @bramus,

Just made some small changes so that the onError prop is called when there is a route request error. This is useful when, for example, Google Maps API doesn't found a route between two places and returns a 200 response with geocoder_status: ZERO_RESULTS. Or when the API key is incorrect.

Now with the onError callback always called on every error we can act accordingly like informing the user.

Tell me what you think if you have any feedback. And in case everything is OK feel free to merge changes. 馃檪

@bramus
Copy link
Owner

bramus commented Mar 17, 2020

Hi @AntonioRedondo, thanks for this PR!

As I'm checking it just now, I see that it has the same effect as the changes to improve error handling I've done earlier today. With that change, the onError callback is also called when a request to the Directions API fails.

I appreciate the work you've done here, and am glad to see that we came to the same result. I will however be closing this PR, as it's no longer of use. Thank you for your time.

If I happen to be mistaken in this analysis, feel free to get back to me and I'll gladly reopen.

@bramus bramus closed this Mar 17, 2020
@AntonioRedondo
Copy link
Author

Hey @bramus, no problem. Totally glad the issue was tackled whether it was with your changes or mines. 馃憤

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.

None yet

2 participants