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

Improve response for site not found case #333

Open
BK01 opened this issue Nov 10, 2022 · 1 comment
Open

Improve response for site not found case #333

BK01 opened this issue Nov 10, 2022 · 1 comment
Labels
Milestone

Comments

@BK01
Copy link
Contributor

BK01 commented Nov 10, 2022

Current state:
When a site is not found, users receive a 404 and an HTML response regardless of format requested.

Test case:
https://geocoder.api.gov.bc.ca/sites/nearest.json?point=-122.861715%2C49.825979&maxDistance=10

Proposed future state:
When a site not found response is given for a ‘near’ or ‘nearest’ request, a ‘No site found’ response is given in the same format as the request (json, geojson etc) with HTTP 200 status code. In some cases, such as SHP format a different approach may be required.

@BK01 BK01 added the geocoder label Nov 10, 2022
@BK01
Copy link
Contributor Author

BK01 commented Nov 18, 2022

In the scenario that no site is found -> For all formats provide a response with a status code of 200 in the same format as the request (may be an empty file in some cases).

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

No branches or pull requests

1 participant