Skip to content

Commit

Permalink
remove custom error handling (use offer to show error in output channel)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattseddon committed May 1, 2023
1 parent 104e653 commit 4a5f1e0
Showing 1 changed file with 10 additions and 18 deletions.
28 changes: 10 additions & 18 deletions extension/src/experiments/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,25 +62,17 @@ export const getPushExperimentCommand =

const remainingProgress = 75

try {
const stdout = await internalCommands.executeCommand(
AvailableCommands.EXP_PUSH,
dvcRoot,
id
)
const stdout = await internalCommands.executeCommand(
AvailableCommands.EXP_PUSH,
dvcRoot,
id
)

progress.report({
increment: remainingProgress,
message: convertUrlTextToLink(stdout)
})
progress.report({
increment: remainingProgress,
message: convertUrlTextToLink(stdout)
})

return Toast.delayProgressClosing(15000)
} catch (error: unknown) {
progress.report({
increment: remainingProgress,
message: (error as Error)?.message || 'an unexpected error occurred'
})
}
return Toast.delayProgressClosing(60000)
return Toast.delayProgressClosing(15000)
})
}

0 comments on commit 4a5f1e0

Please sign in to comment.