Skip to content

Commit

Permalink
fix(cli): Throw a better error message in case of a failed dataset co…
Browse files Browse the repository at this point in the history
…py job (#3314)
  • Loading branch information
tzhelyazkova committed Jun 9, 2022
1 parent 4e775f3 commit b707932
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ const followProgress = (jobId, client, output) => {

spinner.text = `Copy in progress: ${currentProgress}%`
},
error: (err) => {
spinner.fail(`There was an error copying the dataset: ${err.message}`)
error: (event) => {
spinner.fail()
throw new Error(`There was an error copying dataset: ${event.data}`)
},
complete: () => {
spinner.succeed('Copy finished.')
Expand Down

3 comments on commit b707932

@vercel
Copy link

@vercel vercel bot commented on b707932 Jun 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

studio-workshop – ./dev/workshop

studio-workshop-git-next.sanity.build
studio-workshop.sanity.build

@vercel
Copy link

@vercel vercel bot commented on b707932 Jun 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

test-studio – ./

test-studio.sanity.build
test-studio-git-next.sanity.build

@vercel
Copy link

@vercel vercel bot commented on b707932 Jun 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

perf-studio – ./

perf-studio.sanity.build
perf-studio-git-next.sanity.build

Please sign in to comment.