Adding features to find public toilets and shopping streets #41

Merged
kscheidecker merged 21 commits from feature/backend/toilets-and-shopping-streets into main 2024-12-14 15:57:09 +00:00
Showing only changes of commit 291edcfc2a - Show all commits

View File

@ -133,7 +133,7 @@ def get_landmark(landmark_uuid: str) -> Landmark:
try: try:
landmark = cache_client.get(f"landmark_{landmark_uuid}") landmark = cache_client.get(f"landmark_{landmark_uuid}")
if not isinstance(landmark, Landmark) : if not isinstance(landmark, Landmark) :
raise ValueError(f"Object {landmark} is not of type Landmark") raise HTTPException(status_code=500, detail=f"Object {landmark} is not of type Landmark")
return landmark return landmark
except KeyError as exc: except KeyError as exc:
raise HTTPException(status_code=404, detail="Landmark not found") from exc raise HTTPException(status_code=404, detail="Landmark not found") from exc