Skip to content

Commit 98726d3

Browse files
easyCZroboquat
authored andcommitted
[server] Return NOT_FOUND when workspace does not exist
1 parent 801ac5f commit 98726d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/server/src/workspace/gitpod-server-impl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ export class GitpodServerImpl implements GitpodServerWithTracing, Disposable {
924924
protected async internalGetWorkspace(id: string, db: WorkspaceDB): Promise<Workspace> {
925925
const ws = await db.findById(id);
926926
if (!ws) {
927-
throw new Error(`No workspace with id '${id}' found.`);
927+
throw new ResponseError(ErrorCodes.NOT_FOUND, "Workspace not found.");
928928
}
929929
return ws;
930930
}

0 commit comments

Comments
 (0)