Skip to content

Commit 791e7ea

Browse files
committed
Update workspace name errors to include underscore
1 parent c1f1449 commit 791e7ea

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/codegate/api/v1.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ async def create_new_workspace(
8282
raise HTTPException(
8383
status_code=400,
8484
detail=(
85-
"Invalid workspace name. " "Please use only alphanumeric characters and dashes"
85+
"Invalid workspace name. " "Please use only alphanumeric characters, hyphens, or underscores."
8686
),
8787
)
8888
except crud.WorkspaceCrudError as e:
@@ -106,7 +106,7 @@ async def rename_workspace(
106106
raise HTTPException(
107107
status_code=400,
108108
detail=(
109-
"Invalid workspace name. " "Please use only alphanumeric characters and dashes"
109+
"Invalid workspace name. " "Please use only alphanumeric characters, hyphens, or underscores."
110110
),
111111
)
112112
except crud.WorkspaceCrudError as e:

src/codegate/pipeline/cli/commands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ async def _add_workspace(self, flags: Dict[str, str], args: List[str]) -> str:
187187
try:
188188
ws = await self.workspace_crud.add_workspace(new_workspace_name)
189189
except ValidationError:
190-
return "Invalid workspace name: It should be alphanumeric and dashes"
190+
return "Invalid workspace name: It should be alphanumeric with hyphens or underscores"
191191
except AlreadyExistsError:
192192
return f"Workspace **{new_workspace_name}** already exists"
193193
except crud.WorkspaceCrudError:

0 commit comments

Comments
 (0)