Adding features to find public toilets and shopping streets #41
| @@ -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 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user