mirror of
https://github.com/pa11y/pa11y-dashboard.git
synced 2025-09-24 22:31:15 +00:00
Add better error stacks to the log
This commit is contained in:
3
app.js
3
app.js
@@ -65,6 +65,9 @@ function initApp (config, callback) {
|
||||
});
|
||||
app.express.use(function (err, req, res, next) {
|
||||
/* jshint unused: false */
|
||||
if (err.code === 'ECONNREFUSED') {
|
||||
err = new Error('Could not connect to pa11y-webservice');
|
||||
}
|
||||
app.emit('route-error', err);
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
res.locals.error = err;
|
||||
|
Reference in New Issue
Block a user