diff --git a/backend/src/main.py b/backend/src/main.py index 2492f32..e9638f0 100644 --- a/backend/src/main.py +++ b/backend/src/main.py @@ -133,7 +133,7 @@ def get_landmark(landmark_uuid: str) -> Landmark: try: landmark = cache_client.get(f"landmark_{landmark_uuid}") 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 except KeyError as exc: raise HTTPException(status_code=404, detail="Landmark not found") from exc