Closed AntonioRedondo closed 4 years ago
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.
Hey @bramus, no problem. Totally glad the issue was tackled whether it was with your changes or mines. 👍
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 withgeocoder_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. 🙂