Skip to content

Commit 190ff4b

Browse files
author
Jalileh
committed
PR bot suggestion
1 parent 267ebdf commit 190ff4b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/wcore/workspace.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ func UpdateWorkspace(ctx context.Context, workspaceId string, name string, icon
118118
func DeleteWorkspace(ctx context.Context, workspaceId string, force bool) (bool, string, error) {
119119
log.Printf("DeleteWorkspace %s\n", workspaceId)
120120
workspace, err := wstore.DBMustGet[*waveobj.Workspace](ctx, workspaceId)
121-
if err != nil && err.Error() == "not found" {
122-
return true, "", fmt.Errorf("workspace probably already deleted %w", err)
121+
if err != nil && wstore.ErrNotFound == err {
122+
return true, "", fmt.Errorf("workspace already deleted %w", err)
123123
}
124124
// @jalileh list needs to be saved early on i assume
125125
workspaces, err := ListWorkspaces(ctx)

0 commit comments

Comments
 (0)