Skip to content

Commit 25c2368

Browse files
nit: replace delete with archive in workspace crud errors (#764)
1 parent e7d1580 commit 25c2368

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/codegate/workspaces/crud.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ async def soft_delete_workspace(self, workspace_name: str):
161161
if workspace_name == "":
162162
raise WorkspaceCrudError("Workspace name cannot be empty.")
163163
if workspace_name == DEFAULT_WORKSPACE_NAME:
164-
raise WorkspaceCrudError("Cannot delete default workspace.")
164+
raise WorkspaceCrudError("Cannot archive default workspace.")
165165

166166
selected_workspace = await self._db_reader.get_workspace_by_name(workspace_name)
167167
if not selected_workspace:
@@ -170,7 +170,7 @@ async def soft_delete_workspace(self, workspace_name: str):
170170
# Check if workspace is active, if it is, make the default workspace active
171171
active_workspace = await self._db_reader.get_active_workspace()
172172
if active_workspace and active_workspace.id == selected_workspace.id:
173-
raise WorkspaceCrudError("Cannot delete active workspace.")
173+
raise WorkspaceCrudError("Cannot archive active workspace.")
174174

175175
db_recorder = DbRecorder()
176176
try:

0 commit comments

Comments
 (0)