File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/main/kotlin/com/coder/toolbox Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package com.coder.toolbox
3
3
import com.coder.toolbox.browser.BrowserUtil
4
4
import com.coder.toolbox.models.WorkspaceAndAgentStatus
5
5
import com.coder.toolbox.sdk.CoderRestClient
6
+ import com.coder.toolbox.sdk.ex.APIResponseException
6
7
import com.coder.toolbox.sdk.v2.models.Workspace
7
8
import com.coder.toolbox.sdk.v2.models.WorkspaceAgent
8
9
import com.coder.toolbox.util.withPath
@@ -147,11 +148,11 @@ class CoderRemoteEnvironment(
147
148
)
148
149
}
149
150
if (shouldDelete) {
150
- if (status.canStop()) {
151
- client.stopWorkspace(workspace)
151
+ try {
152
+ client.removeWorkspace(workspace)
153
+ } catch (e: APIResponseException ) {
154
+ ui.showErrorInfoPopup(e)
152
155
}
153
-
154
- client.removeWorkspace(workspace)
155
156
}
156
157
}
157
158
}
You can’t perform that action at this time.
0 commit comments