Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Commit e1613ea

Browse files
committed
Fix exceptions in delete handler
Signed-off-by: Juan Antonio Osorio <[email protected]>
1 parent 6f4e216 commit e1613ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/codegate/api/v1.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ async def delete_workspace(workspace_name: str):
8585
try:
8686
_ = await wscrud.soft_delete_workspace(workspace_name)
8787
except crud.WorkspaceDoesNotExistError:
88-
return HTTPException(status_code=404, detail="Workspace does not exist")
88+
raise HTTPException(status_code=404, detail="Workspace does not exist")
8989
except Exception:
90-
return HTTPException(status_code=500, detail="Internal server error")
90+
raise HTTPException(status_code=500, detail="Internal server error")
9191

9292
return Response(status_code=204)

0 commit comments

Comments
 (0)