wip api-v3: add error handler middleware and custom error classes

This commit is contained in:
Matteo Pagliazzi
2015-11-03 13:35:32 +01:00
parent b21df9edb3
commit 4322b8c3dc
4 changed files with 98 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
'use strict';
// This module is only used to attach middlewares to the express app
let errorHandler = require('./errorHandler');
module.exports = function (app) {
// Error handler middleware, define as the last one
app.use(errorHandler);
};