Skip to content

Commit aae3c8d

Browse files
author
Marcel Jahn
committed
master: adding basic onError cb
1 parent a742953 commit aae3c8d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/app.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ module.exports = (app, options) => {
123123
? errorHtml = errorHtml.replace('<!--server-error-msg-->', errorMessage)
124124
: errorHtml += errorMessage
125125
}
126+
127+
if (config.onError) {
128+
config.onError(err, res)
129+
}
126130
}
127131

128132
res.status(500).send(errorHtml)

0 commit comments

Comments
 (0)