chyz 2.0.0-rc.36 → 2.0.0-rc.37
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.
- package/BaseChyz.js +3 -2
- package/package.json +1 -1
package/BaseChyz.js
CHANGED
|
@@ -386,7 +386,8 @@ class BaseChyz {
|
|
|
386
386
|
catch (e) {
|
|
387
387
|
BaseChyz.error(e);
|
|
388
388
|
res.status(e.statusCode || 500);
|
|
389
|
-
res.json({
|
|
389
|
+
// res.json({error: {code: e.statusCode || 500, name: e.name, message: e.message}})
|
|
390
|
+
res.json(e.toJSON());
|
|
390
391
|
// next(e)
|
|
391
392
|
}
|
|
392
393
|
}), (req, res, next) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -403,7 +404,7 @@ class BaseChyz {
|
|
|
403
404
|
// @ts-ignore
|
|
404
405
|
res.status(e.statusCode || 500);
|
|
405
406
|
// @ts-ignore
|
|
406
|
-
res.json(
|
|
407
|
+
res.json(e.toJSON());
|
|
407
408
|
}
|
|
408
409
|
else {
|
|
409
410
|
res.json(e);
|