Skip to content

Commit

Permalink
fix(ui): progress handler should not throw error (casuing process to …
Browse files Browse the repository at this point in the history
…exit)
  • Loading branch information
Guillaume Chau committed Mar 14, 2018
1 parent ca01d95 commit 3d4d8f0
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions packages/@vue/cli-ui/src/graphql-api/connectors/progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,17 @@ async function wrap (id, context, operation) {
set({ id }, context)

let result
let error = null
try {
result = await operation(data => {
set(Object.assign({ id }, data), context)
})
} catch (e) {
error = e
} catch (error) {
console.error(error)
set({ id, error: error.message }, context)
}

remove(id, context)

if (error) {
throw error
}

return result
}

Expand Down

0 comments on commit 3d4d8f0

Please sign in to comment.