Show Nominatim 403 error to user in Web UI
Closes #5 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
0d2cfd56cb
commit
ea2b3c18d8
2 changed files with 6 additions and 1 deletions
|
|
@ -31,6 +31,8 @@ def lookup_with_params(**kwargs: str) -> list[Hit]:
|
|||
r = requests.get(url, params=params, headers=user_agent_headers())
|
||||
if r.status_code == 500:
|
||||
raise SearchError
|
||||
if r.status_code == 403:
|
||||
raise SearchError("Nominatim returned 403 Forbidden")
|
||||
|
||||
try:
|
||||
reply: list[Hit] = json.loads(r.text, object_pairs_hook=OrderedDict)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue