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

fix: ensure remote errors in LocationIQ Provider are handled #387

Merged
merged 3 commits into from
Nov 18, 2023

Conversation

t1m0thy
Copy link
Contributor

@t1m0thy t1m0thy commented Nov 14, 2023

Location IQ throws a 404 error when it is unable to locate any match. such as when typing "san Angl" and there are no places that begin with that string. To repair, the parse method checks for the response.data.error in the response, returns an empty string if it has an error, and otherwise, hands back up to the parent class.

I am new to this library (and not a typescript expert), so while I believe this works, if there is a better way to handle errors, happy to learn!

handle 404 errors from locationIQ
cleanup typescript
@smeijer smeijer changed the title fixes #367 - Repair LocationIQ Provider fix: ensure remote errors in LocationIQ Provider are handled Nov 18, 2023
@smeijer smeijer merged commit 5f8c172 into smeijer:develop Nov 18, 2023
8 checks passed
@smeijer
Copy link
Owner

smeijer commented Nov 18, 2023

Thank you!

@smeijer
Copy link
Owner

smeijer commented Nov 18, 2023

@all-contributors please add @t1m0thy for code

Copy link
Contributor

@smeijer

I've put up a pull request to add @t1m0thy! 🎉

@smeijer
Copy link
Owner

smeijer commented Nov 18, 2023

🎉 This PR is included in version 3.11.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants