Skip to content

Commit a5529a4

Browse files
committed
Replace deploy worker error
1 parent 6f1a610 commit a5529a4

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/main/kotlin/com/coder/gateway/views/steps/CoderLocateRemoteProjectStepView.kt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,15 @@ class CoderLocateRemoteProjectStepView(private val setNextButtonEnabled: (Boolea
215215
update = { attempt, retryMs, e ->
216216
logger.error("Failed to retrieve IDEs (attempt $attempt; will retry in $retryMs ms)", e)
217217
cbIDEComment.foreground = UIUtil.getErrorForeground()
218-
cbIDEComment.text = e.message ?: "The error did not provide any further details"
218+
// When the dd command times out all we get is a
219+
// DeployException and some text that it failed but not why.
220+
// Plus it includes a long tmp path that is a bit nasty to
221+
// display so replace it with something nicer.
222+
if (e is DeployException && e.message.contains("Worker binary deploy failed")) {
223+
cbIDEComment.text = "Failed to upload worker binary...it may have timed out. Check the command log for details."
224+
} else {
225+
cbIDEComment.text = e.message ?: "The error did not provide any further details."
226+
}
219227
val delayS = TimeUnit.MILLISECONDS.toSeconds(retryMs)
220228
val delay = if (delayS < 1) "now" else "in $delayS second${if (delayS > 1) "s" else ""}"
221229
cbIDE.renderer = IDECellRenderer(CoderGatewayBundle.message("gateway.connector.view.coder.remoteproject.retry-error.text", delay))

0 commit comments

Comments
 (0)