bcgov / bcgov/ols-geocoder

Improve response for site not found case

Open
#333 1 comment 0 reactions 0 assignees View on GitHub
geocoder
Dominant language
Java
Stars
17
Forks
7
Avg merge
10h 2m
Merged PRs (30d)
15

Description

**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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the nearest.json request at the URL in the issue and trace how a missing site is handled for near or nearest requests. Inspect the response-format paths for JSON, GeoJSON, and other formats, including the noted SHP exception. Done means a missing site returns a format-matched “No site found” response with HTTP 200 where applicable.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.