mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 23:27:26 +01:00
wip api-v3: add error handler middleware and custom error classes
This commit is contained in:
11
website/src/middlewares/api-v3/index.js
Normal file
11
website/src/middlewares/api-v3/index.js
Normal 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);
|
||||
};
|
||||
Reference in New Issue
Block a user