@aldb2b/common 1.0.403 → 1.0.404

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.
@@ -0,0 +1,4 @@
1
+ import { HttpException, HttpStatus } from '@nestjs/common';
2
+ export declare class CustomExceptionHandler extends HttpException {
3
+ constructor(status: HttpStatus, message: string, data?: any);
4
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CustomExceptionHandler = void 0;
4
+ const common_1 = require("@nestjs/common");
5
+ class CustomExceptionHandler extends common_1.HttpException {
6
+ constructor(status, message, data = {}) {
7
+ super({ message, data }, status);
8
+ }
9
+ }
10
+ exports.CustomExceptionHandler = CustomExceptionHandler;
11
+ //# sourceMappingURL=custom-exception.handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-exception.handler.js","sourceRoot":"","sources":["../../src/interceptors/custom-exception.handler.ts"],"names":[],"mappings":";;;AAAA,2CAA2D;AAE3D,MAAa,sBAAuB,SAAQ,sBAAa;IACvD,YAAY,MAAkB,EAAE,OAAe,EAAE,OAAY,EAAE;QAC7D,KAAK,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,MAAM,CAAC,CAAC;IACnC,CAAC;CACF;AAJD,wDAIC"}
@@ -1492,12 +1492,12 @@
1492
1492
  "affectsGlobalScope": false
1493
1493
  },
1494
1494
  "../src/validators/responses/error.interface.ts": {
1495
- "version": "9cc7a7a47648ef4bd300c3f4dd8f89e6eb8b57c4f612e54208c7c5447d8ec55f",
1496
- "signature": "2e18eda2d51f797ec65127fb2cb8a61be77a7d8110940aa57f7bf7859d2b1def",
1495
+ "version": "d85acd8b23ccdf633b27d15ff8714fb36c293f9914abeae880de9bf4344344af",
1496
+ "signature": "8156486782c49673111fded58c5d917d2ed6a6868a211c116b3cfcef27c9edd7",
1497
1497
  "affectsGlobalScope": false
1498
1498
  },
1499
1499
  "../src/validators/responses/error.ts": {
1500
- "version": "61fdedec7a793d193c1d3bde2c949f3a727d6fccd9e84251522dc26239d4c80d",
1500
+ "version": "5b11500772b89ebcc164f70e76d463adc8e4ced07aa443217c001d7a942a8f0b",
1501
1501
  "signature": "f6a8b4e6d49ee03ec0056d2c0faaea725c6a15a5718a2cd0771e36f9e5affa76",
1502
1502
  "affectsGlobalScope": false
1503
1503
  },
@@ -6876,6 +6876,11 @@
6876
6876
  "signature": "2388b17bfe1f2e511b4960ec098cf5db020cec29e4f50f8676f8aa64da10c581",
6877
6877
  "affectsGlobalScope": false
6878
6878
  },
6879
+ "../src/interceptors/custom-exception.handler.ts": {
6880
+ "version": "6bfcad2dfe7ca61dfc9737c6bf4899de68a4882759dce49935425ce3b66dccb0",
6881
+ "signature": "fbada6fd3ce4e9a4d254687db0c633827f5276a73bf2917dffae444e48cae4d9",
6882
+ "affectsGlobalScope": false
6883
+ },
6879
6884
  "../node_modules/@types/minimatch/index.d.ts": {
6880
6885
  "version": "95c22bc19835e28e2e524a4bb8898eb5f2107b640d7279a6d3aade261916bbf2",
6881
6886
  "signature": "95c22bc19835e28e2e524a4bb8898eb5f2107b640d7279a6d3aade261916bbf2",
@@ -12284,6 +12289,9 @@
12284
12289
  "../src/validators/validateProjectionResult.ts",
12285
12290
  "../src/validators/validateUpdateItem.ts"
12286
12291
  ],
12292
+ "../src/interceptors/custom-exception.handler.ts": [
12293
+ "../node_modules/@nestjs/common/index.d.ts"
12294
+ ],
12287
12295
  "../src/interceptors/response-with-code.interceptor.ts": [
12288
12296
  "../node_modules/@nestjs/common/index.d.ts",
12289
12297
  "../node_modules/rxjs/dist/types/index.d.ts",
@@ -17783,6 +17791,9 @@
17783
17791
  "../src/validators/validateProjectionResult.ts",
17784
17792
  "../src/validators/validateUpdateItem.ts"
17785
17793
  ],
17794
+ "../src/interceptors/custom-exception.handler.ts": [
17795
+ "../node_modules/@nestjs/common/index.d.ts"
17796
+ ],
17786
17797
  "../src/interceptors/response-with-code.interceptor.ts": [
17787
17798
  "../node_modules/@nestjs/common/index.d.ts",
17788
17799
  "../node_modules/rxjs/dist/types/index.d.ts"
@@ -19188,6 +19199,7 @@
19188
19199
  "../src/events/update-meeting-status.interface.ts",
19189
19200
  "../src/events/update-user-event-info.interface.ts",
19190
19201
  "../src/index.ts",
19202
+ "../src/interceptors/custom-exception.handler.ts",
19191
19203
  "../src/interceptors/response-with-code.interceptor.ts",
19192
19204
  "../src/interceptors/response.interceptor.ts",
19193
19205
  "../src/interceptors/serialize.interceptor.ts",
@@ -1,4 +1,5 @@
1
1
  export interface ErrorResponse {
2
2
  success: boolean;
3
3
  error: object;
4
+ data?: object;
4
5
  }
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.error = void 0;
4
4
  function error(err) {
5
- var _a;
5
+ var _a, _b;
6
6
  const error = ((_a = err === null || err === void 0 ? void 0 : err.response) === null || _a === void 0 ? void 0 : _a.message)
7
7
  ? err.response.message
8
8
  : err.stack
@@ -11,6 +11,7 @@ function error(err) {
11
11
  return {
12
12
  success: false,
13
13
  error: error,
14
+ data: (_b = err === null || err === void 0 ? void 0 : err.response) === null || _b === void 0 ? void 0 : _b.data,
14
15
  };
15
16
  }
16
17
  exports.error = error;
@@ -1 +1 @@
1
- {"version":3,"file":"error.js","sourceRoot":"","sources":["../../../src/validators/responses/error.ts"],"names":[],"mappings":";;;AAEA,SAAgB,KAAK,CAAC,GAAG;;IACvB,MAAM,KAAK,GAAG,CAAA,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,QAAQ,0CAAE,OAAO;QAClC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO;QACtB,CAAC,CAAC,GAAG,CAAC,KAAK;YACX,CAAC,CAAC,GAAG,CAAC,KAAK;YACX,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,GAAG,CAAA;IAC5B,OAAO;QACL,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,KAAK;KACb,CAAA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b;AACH,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aldb2b/common",
3
- "version": "1.0.403",
3
+ "version": "1.0.404",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",