Static GitHub Issues

[3335] Catch error in fetch/asyncData methods for error reporting with Vue.config.errorHandler dont work

prev: [next] Nuxt with AmCharts 4
next: sockjs-node errors

Version

v1.4.0

Reproduction link

https://glitch.com/edit/#!/jumpy-boat

Steps to reproduce

Its a must have for error reporting with tools like bugsnag, sentry etc. They register error handlers for Vue.config.errorHandler but this doesnt get triggered for some reason when error get happened inside fetch/asyncData, maybe in some other nuxt methods dont know. This error wont be catched. It also wont be catched by general js script error catcher in bugsnag, nuxt will process it itself and show a error page. So basically this errors will be lost If it happens on SSR it can be catched via render:errorMiddleware hook. But it dont work for client. Same happens in latest edge version.

What is expected ?

Errors trigger errorHandler as in mount

What is actually happening?

Nothing get triggered, error got eaten by nuxt.

Additional comments?

Any workaround?

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This bug report is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c7070">#c7070</a>)</em></sub></div>