Nuxt.js: Catch error in fetch/asyncData methods for error reporting with Vue.config.errorHandler dont work

Created on 12 May 2018  路  3Comments  路  Source: nuxt/nuxt.js

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?

This bug report is available on Nuxt.js community (#c7070)
bug-report

Most helpful comment

We will work on this @aldarund

Thank you for this bug report.

All 3 comments

We will work on this @aldarund

Thank you for this bug report.

This bug-report has been fixed by @clarkdo.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mattdharmon picture mattdharmon  路  3Comments

bimohxh picture bimohxh  路  3Comments

vadimsg picture vadimsg  路  3Comments

maicong picture maicong  路  3Comments

danieloprado picture danieloprado  路  3Comments