@duvdu-v1/duvdu 1.1.120 → 1.1.122
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.
|
@@ -28,6 +28,6 @@ const globalErrorHandlingMiddleware = (err, req, res, next) => {
|
|
|
28
28
|
if (err.name === 'TokenExpiredError')
|
|
29
29
|
return res.status(401).json({ errors: [{ message: 'expired token' }] });
|
|
30
30
|
// unHandled error
|
|
31
|
-
res.status(500).json({ errors: [{ message: 'server error' }] });
|
|
31
|
+
res.status(500).json({ errors: [{ message: 'server error', details: err }] });
|
|
32
32
|
};
|
|
33
33
|
exports.globalErrorHandlingMiddleware = globalErrorHandlingMiddleware;
|