@duvdu-v1/duvdu 1.1.241 → 1.1.242
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6,8 +6,7 @@ const winston_1 = require("../config/winston");
|
|
|
6
6
|
const custom_error_1 = require("../errors/custom-error");
|
|
7
7
|
// eslint-disable-next-line
|
|
8
8
|
const globalErrorHandlingMiddleware = (err, req, res, next) => {
|
|
9
|
-
|
|
10
|
-
console.log(err);
|
|
9
|
+
console.log(err);
|
|
11
10
|
// custom error
|
|
12
11
|
if (err instanceof custom_error_1.CustomError) {
|
|
13
12
|
return res.status(err.statusCode).json({ errors: err.serializeError() });
|