|
|
@@ -68,6 +68,10 @@ async def geonames_search(q: str, max_rows: int = 8):
|
|
|
async with httpx.AsyncClient(timeout=5.0) as client:
|
|
|
resp = await client.get(url, params=params)
|
|
|
data = resp.json()
|
|
|
+ # Check for GeoNames error responses
|
|
|
+ if "status" in data and "message" in data["status"]:
|
|
|
+ logger.warning(f"geonames error: {data['status']['message']}")
|
|
|
+ return []
|
|
|
results = []
|
|
|
for item in data.get("geonames", []):
|
|
|
results.append({
|