@saihu/common 1.1.94 → 1.1.95
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unified-exception.filter.d.ts","sourceRoot":"","sources":["../../src/errors/unified-exception.filter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAEf,aAAa,EAGd,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"unified-exception.filter.d.ts","sourceRoot":"","sources":["../../src/errors/unified-exception.filter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAEf,aAAa,EAGd,MAAM,gBAAgB,CAAC;AAQxB,qBACa,sBAAuB,YAAW,eAAe;IAC5D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA2C;IAElE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAM7B;IACF,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAQ;IAE3C,KAAK,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,aAAa;IA+CzC,OAAO,CAAC,2BAA2B;IAUnC,OAAO,CAAC,QAAQ;IAiChB;;;OAGG;IACH,OAAO,CAAC,eAAe;IAoBvB;;;OAGG;IACH,OAAO,CAAC,eAAe;IAUvB;;OAEG;IACH,OAAO,CAAC,cAAc;IAmCtB;;;OAGG;IACH,OAAO,CAAC,cAAc;CAQvB"}
|
|
@@ -13,6 +13,7 @@ const domain_error_1 = require("./domain.error");
|
|
|
13
13
|
const application_error_1 = require("./application.error");
|
|
14
14
|
const infrastructure_error_1 = require("./infrastructure.error");
|
|
15
15
|
const dto_1 = require("../dto");
|
|
16
|
+
const times_1 = require("../util/times");
|
|
16
17
|
let UnifiedExceptionFilter = UnifiedExceptionFilter_1 = class UnifiedExceptionFilter {
|
|
17
18
|
constructor() {
|
|
18
19
|
this.logger = new common_1.Logger(UnifiedExceptionFilter_1.name);
|
|
@@ -66,7 +67,7 @@ let UnifiedExceptionFilter = UnifiedExceptionFilter_1 = class UnifiedExceptionFi
|
|
|
66
67
|
errorResponse.errorCode = errorCode;
|
|
67
68
|
if (details)
|
|
68
69
|
errorResponse.details = this.sanitizeDetails(details);
|
|
69
|
-
errorResponse.timestamp =
|
|
70
|
+
errorResponse.timestamp = (0, times_1.getCurrentChinaTime)().toISOString();
|
|
70
71
|
response.status(statusCode).json(errorResponse);
|
|
71
72
|
}
|
|
72
73
|
mapAppErrorCodeToHttpStatus(code) {
|