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

Catch 'No Route found' response #278

Merged
merged 6 commits into from
Jan 21, 2022
Merged

Conversation

malwoodsantoro
Copy link
Contributor

@malwoodsantoro malwoodsantoro commented Oct 27, 2021

Currently routes that return 'No route found' cause the following error:

TypeError: Cannot read property '0' of undefined
  at XMLHttpRequest.request.onload (/mapbox-gl-js/plugins/mapbox-gl-directions/v3.1.1/mapbox-gl-directions.js:5819:44)

image

This change catches these responses and displays the appropriate message to the user (see screenshot above).

@malwoodsantoro
Copy link
Contributor Author

Hi @avpeery 👋 I wanted to check in on #280 to move this PR forward if possible. Let me know if there is anything I can do to help!

@avpeery
Copy link
Contributor

avpeery commented Jan 5, 2022

Hi @avpeery 👋 I wanted to check in on #280 to move this PR forward if possible. Let me know if there is anything I can do to help!

Hi @malwoodsantoro Just revisited the PR and fixed the failing unit test issue, good for review!

@avpeery
Copy link
Contributor

avpeery commented Jan 6, 2022

@malwoodsantoro merged in #280 !

@malwoodsantoro malwoodsantoro merged commit 1366907 into master Jan 21, 2022
@stepankuzmin stepankuzmin deleted the catch-no-route-response branch December 8, 2022 14:11
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