@punks/backend-entity-manager 0.0.69 → 0.0.71
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/dist/cjs/index.js +9 -7
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +10 -8
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Log, sort, byField, toDict, newUuid as newUuid$1, removeUndefinedProps } from '@punks/backend-core';
|
|
2
|
-
import { applyDecorators, Injectable, SetMetadata, Global, Module, Scope, Logger,
|
|
2
|
+
import { applyDecorators, Injectable, SetMetadata, Global, Module, Scope, Logger, HttpException, HttpStatus } from '@nestjs/common';
|
|
3
3
|
import { ApiProperty } from '@nestjs/swagger';
|
|
4
4
|
import { Reflector } from '@nestjs/core';
|
|
5
5
|
import { AsyncLocalStorage } from 'async_hooks';
|
|
@@ -20398,13 +20398,15 @@ class AppExceptionsFilterBase {
|
|
|
20398
20398
|
const ctx = host.switchToHttp();
|
|
20399
20399
|
const response = ctx.getResponse();
|
|
20400
20400
|
const request = ctx.getRequest();
|
|
20401
|
-
|
|
20402
|
-
|
|
20403
|
-
|
|
20404
|
-
|
|
20405
|
-
|
|
20406
|
-
|
|
20407
|
-
|
|
20401
|
+
if (!(exception instanceof HttpException)) {
|
|
20402
|
+
this.logError({
|
|
20403
|
+
exception,
|
|
20404
|
+
request,
|
|
20405
|
+
response,
|
|
20406
|
+
}).catch((error) => {
|
|
20407
|
+
Log.getLogger("AllExceptionsFilter").error("Error logging failed", error);
|
|
20408
|
+
});
|
|
20409
|
+
}
|
|
20408
20410
|
const status = this.getErrorStatusCode(exception);
|
|
20409
20411
|
response.status(status).json({
|
|
20410
20412
|
statusCode: status,
|