@articketing2021/common 1.0.5 → 1.0.6
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.
|
@@ -7,8 +7,9 @@ const errorHandler = (err, req, res, next) => {
|
|
|
7
7
|
if (err instanceof custom_error_1.CustomError) {
|
|
8
8
|
return res.status(err.statusCode).json(err.serializeErrors());
|
|
9
9
|
}
|
|
10
|
+
console.error("error: ", err);
|
|
10
11
|
res.status(500).send({
|
|
11
|
-
message: (_a = err.message) !== null && _a !== void 0 ? _a :
|
|
12
|
+
message: (_a = err.message) !== null && _a !== void 0 ? _a : "Something went wrong",
|
|
12
13
|
});
|
|
13
14
|
};
|
|
14
15
|
exports.errorHandler = errorHandler;
|
package/package.json
CHANGED