mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-17 06:01:34 +00:00
feat: added errorMiddleware hook. (#2703)
This commit is contained in:
parent
4811ddd6b9
commit
7bea248fe4
@ -280,6 +280,11 @@ module.exports = class Renderer {
|
||||
// Error middleware for errors that occurred in middleware that declared above
|
||||
// Middleware should exactly take 4 arguments
|
||||
// https://github.com/senchalabs/connect#error-middleware
|
||||
|
||||
// Apply errorMiddleware from modules first
|
||||
await this.nuxt.callHook('render:errorMiddleware', this.app)
|
||||
|
||||
// Apply errorMiddleware from Nuxt
|
||||
this.useMiddleware(errorMiddleware.bind(this))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user