kjaymiller / kjaymiller/fire-map
POST /reload can return null instead of GeoJSON
- Dominant language
- Python
- Stars
- 5
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
**File:** web/app.py:257
`POST /reload` returns `JSONResponse(cache.get_current())` without checking for `None`.
**Failure scenario:** On a fresh deployment where Valkey has never been populated and FIRMS returns zero detections, `reload_data()`'s empty-features branch never calls `cache.set_current()`, so `get_current()` is still `None`. The route returns HTTP 200 with a literal `null` body instead of a GeoJSON FeatureCollection, breaking any caller (including a scheduled `mise run reload`) expecting GeoJSON.
**Category:** correctness
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at web/app.py:257 and trace POST /reload through reload_data()'s empty-features branch and the cache calls. Verify the fresh-deployment case where FIRMS returns zero detections, and ensure the endpoint returns a GeoJSON FeatureCollection rather than null.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100