grm-shared-library 1.0.24 → 1.0.25
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.
|
@@ -9,7 +9,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
exports.HttpExceptionFilter = void 0;
|
|
10
10
|
const common_1 = require("@nestjs/common");
|
|
11
11
|
const error_codes_enum_1 = require("../enums/error-codes.enum");
|
|
12
|
-
const custom_rpc_exception_1 = require("../custom-exception/custom-rpc.exception");
|
|
13
12
|
const error_logger_1 = require("../error-logger/error-logger");
|
|
14
13
|
let HttpExceptionFilter = class HttpExceptionFilter {
|
|
15
14
|
catch(exception, host) {
|
|
@@ -25,12 +24,8 @@ let HttpExceptionFilter = class HttpExceptionFilter {
|
|
|
25
24
|
if (exception instanceof common_1.HttpException) {
|
|
26
25
|
status = exception.getStatus();
|
|
27
26
|
errorResponse = exception.getResponse();
|
|
28
|
-
(0, error_logger_1.logError)(exception);
|
|
29
|
-
}
|
|
30
|
-
else if (exception instanceof custom_rpc_exception_1.CustomRpcException) {
|
|
31
|
-
errorResponse = exception.getErrorResponse();
|
|
32
|
-
(0, error_logger_1.logError)(exception, exception.getContext());
|
|
33
27
|
}
|
|
28
|
+
(0, error_logger_1.logError)(exception);
|
|
34
29
|
response.status(status).json({
|
|
35
30
|
...errorResponse,
|
|
36
31
|
path: request.url,
|