diff --git a/app.py b/app.py index cfded1d..7d5a2f1 100644 --- a/app.py +++ b/app.py @@ -419,8 +419,6 @@ def api_place( endpoints expose as ``place`` (snapped to the grid cell, reverse-geocoded and cached). Resolved on its own so the compare page can show a location's name as soon as it's added, before its full series loads.""" - if not grid.in_north_america(lat, lon): - return {"place": None} cell = grid.snap(lat, lon) with audit.RunAudit(endpoint="place", lat=round(lat, 4), lon=round(lon, 4), cell_id=cell["id"]) as run: @@ -567,8 +565,11 @@ def api_day( lon=round(lon, 4), cell_id=cell["id"], ) as run: - with run.phase("history"): - history, cache_meta = climate.get_history(cell) + try: + with run.phase("history"): + history, cache_meta = climate.get_history(cell) + except Exception as e: # noqa: BLE001 + raise _weather_fetch_error(e) if history.empty: raise HTTPException(status_code=404, detail="No historical data for this cell.")