From 9f966117af2f2b6a37c8f29519f402304072e97a Mon Sep 17 00:00:00 2001 From: itskovacs Date: Tue, 28 Oct 2025 18:20:59 +0100 Subject: [PATCH] :bug: Fix unhandled raise --- backend/trip/security.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/trip/security.py b/backend/trip/security.py index 9b9c583..75d0338 100644 --- a/backend/trip/security.py +++ b/backend/trip/security.py @@ -62,7 +62,7 @@ def verify_exists_and_owns(username: str, obj) -> None: raise HTTPException(status_code=404, detail="The resource does not exist") if obj.user != username: - raise PermissionError + raise HTTPException(status_code=403, detail="Forbidden") return None