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

localities parameter - error handling #364

Open
BK01 opened this issue Aug 4, 2023 · 1 comment
Open

localities parameter - error handling #364

BK01 opened this issue Aug 4, 2023 · 1 comment
Labels
bug Something isn't working geocoder

Comments

@BK01
Copy link
Contributor

BK01 commented Aug 4, 2023

Issue:
If the localities parameter includes an incorrect locality spelling it results in a 500 error. This is not an issue with the notLocalities parameter.

Example:
http 200:
https://geocoder.api.gov.bc.ca/addresses.json?addressString=100%20Main%20Street&localities=Penticton

http 500:
https://geocoder.api.gov.bc.ca/addresses.json?addressString=100%20Main%20Street&localities=Pentiton

@BK01 BK01 added bug Something isn't working geocoder labels Aug 4, 2023
@cmhodgson
Copy link
Collaborator

This happens because there is no match found in the (mispelled) locality, so the BC match gets added, and it has no locality, so the filter breaks on comparison because I missed a null check. After adding the null check you get no match at all. Perhaps we want to increase the smartness of this filter to handle minor misspellings or to provide some kind of error when a locality filter doesn't match to a locality name exactly (or with a misspelling tolerance).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working geocoder
Projects
None yet
Development

No branches or pull requests

2 participants