diff --git a/backend/app/api/endpoints/shares.py b/backend/app/api/endpoints/shares.py index ee81e903..3d67207d 100644 --- a/backend/app/api/endpoints/shares.py +++ b/backend/app/api/endpoints/shares.py @@ -72,8 +72,8 @@ async def create_share( if session.user_id != current_user.id and not current_user.is_super_admin: raise HTTPException( - status_code=status.HTTP_403_FORBIDDEN, - detail="Only the session owner can create share links" + status_code=status.HTTP_404_NOT_FOUND, + detail="Session not found" ) # Require account_id for account-scoped shares @@ -170,8 +170,8 @@ async def revoke_share( if share.created_by != current_user.id and not current_user.is_super_admin: raise HTTPException( - status_code=status.HTTP_403_FORBIDDEN, - detail="Only the share creator can revoke it" + status_code=status.HTTP_404_NOT_FOUND, + detail="Share not found" ) share.is_active = False