Skip to content

Commit

Permalink
[server] Return NOT_FOUND when workspace does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
easyCZ authored and roboquat committed May 10, 2022
1 parent 801ac5f commit 98726d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/server/src/workspace/gitpod-server-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ export class GitpodServerImpl implements GitpodServerWithTracing, Disposable {
protected async internalGetWorkspace(id: string, db: WorkspaceDB): Promise<Workspace> {
const ws = await db.findById(id);
if (!ws) {
throw new Error(`No workspace with id '${id}' found.`);
throw new ResponseError(ErrorCodes.NOT_FOUND, "Workspace not found.");
}
return ws;
}
Expand Down

0 comments on commit 98726d3

Please sign in to comment.