Custom nitro errorHandler, but maintain Nuxt’s error handling.
error hook is too "late" because (in prod) we lose the stack trace (https://github.com/nuxt/nuxt/blob/2466af53b0331cdb8b17c2c3b08675c5985deaf3/packages/nuxt/src/core/runtime/nitro/error.ts#L18-L21) which we need for our logging platform.We have defined a custom nitro error handler:
which works great for getting the original error object — however, we’d like to the invoke the default Nuxt error handling. in a perfect world our handler would just be a higher order function:
GitHub
The Intuitive Vue Framework. Contribute to nuxt/nuxt development by creating an account on GitHub.