Skip to content

Commit

Permalink
fix(nuxt): reject the call if failed
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Aug 5, 2020
1 parent 42f1425 commit 62b00da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nuxt/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default (ctx, inject) => {
return err.response.json().then((body) => {
const errorObject = { statusCode: err.response.status, message: err.message, body }
ctx.error(errorObject)
return errorObject
return Promise.reject(errorObject)
})
})
<% } %>
Expand Down

0 comments on commit 62b00da

Please sign in to comment.