@rsdk/core 3.3.3 → 3.4.0-next.0

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/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.4.0-next.0](https://github.com/R-Vision/rsdk/compare/v3.3.3...v3.4.0-next.0) (2023-08-23)
7
+
8
+ ### Features
9
+
10
+ * **core:** verbose parser exception ([c680eef](https://github.com/R-Vision/rsdk/commit/c680eef31385e2a29daa604ebd72487f79cddafa))
11
+
6
12
  ## [3.3.3](https://github.com/R-Vision/rsdk/compare/v3.3.3-next.0...v3.3.3) (2023-08-23)
7
13
 
8
14
  **Note:** Version bump only for package @rsdk/core
@@ -4,7 +4,7 @@ export declare class PropertyException extends PlatformException {
4
4
  constructor(msg: string, details: {
5
5
  propertyMetadata: PropertyMetadata;
6
6
  preparedKey: string;
7
- });
7
+ }, cause?: unknown);
8
8
  static fromError(err: any, details: {
9
9
  propertyMetadata: PropertyMetadata;
10
10
  preparedKey: string;
@@ -3,13 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PropertyException = void 0;
4
4
  const exceptions_1 = require("../../exceptions");
5
5
  class PropertyException extends exceptions_1.PlatformException {
6
- constructor(msg, details) {
6
+ constructor(msg, details, cause) {
7
7
  super('CONFIG:PROPERTY', msg, {
8
8
  details,
9
+ cause,
9
10
  });
10
11
  }
11
12
  static fromError(err, details) {
12
- return new PropertyException(err.message || 'UNKNOWN ERROR', details);
13
+ return new PropertyException(`${details.preparedKey}: ${err.message}` || 'UNKNOWN ERROR', details, err);
13
14
  }
14
15
  }
15
16
  exports.PropertyException = PropertyException;
@@ -1 +1 @@
1
- {"version":3,"file":"property.exception.js","sourceRoot":"","sources":["../../../src/config/exceptions/property.exception.ts"],"names":[],"mappings":";;;AAAA,iDAAqD;AAGrD,MAAa,iBAAkB,SAAQ,8BAAiB;IACtD,YACE,GAAW,EACX,OAAoE;QAEpE,KAAK,CAAC,iBAAiB,EAAE,GAAG,EAAE;YAC5B,OAAO;SACR,CAAC,CAAC;IACL,CAAC;IAED,MAAM,CAAC,SAAS,CACd,GAAQ,EACR,OAAoE;QAEpE,OAAO,IAAI,iBAAiB,CAAC,GAAG,CAAC,OAAO,IAAI,eAAe,EAAE,OAAO,CAAC,CAAC;IACxE,CAAC;CACF;AAhBD,8CAgBC"}
1
+ {"version":3,"file":"property.exception.js","sourceRoot":"","sources":["../../../src/config/exceptions/property.exception.ts"],"names":[],"mappings":";;;AAAA,iDAAqD;AAGrD,MAAa,iBAAkB,SAAQ,8BAAiB;IACtD,YACE,GAAW,EACX,OAAoE,EACpE,KAAe;QAEf,KAAK,CAAC,iBAAiB,EAAE,GAAG,EAAE;YAC5B,OAAO;YACP,KAAK;SACN,CAAC,CAAC;IACL,CAAC;IAED,MAAM,CAAC,SAAS,CACd,GAAQ,EACR,OAAoE;QAEpE,OAAO,IAAI,iBAAiB,CAC1B,GAAG,OAAO,CAAC,WAAW,KAAK,GAAG,CAAC,OAAO,EAAE,IAAI,eAAe,EAC3D,OAAO,EACP,GAAG,CACJ,CAAC;IACJ,CAAC;CACF;AAtBD,8CAsBC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsdk/core",
3
- "version": "3.3.3",
3
+ "version": "3.4.0-next.0",
4
4
  "description": "Nestjs based microservice chassis",
5
5
  "license": "Apache License 2.0",
6
6
  "publishConfig": {
@@ -43,5 +43,5 @@
43
43
  "reflect-metadata": "^0.1.13",
44
44
  "rxjs": "^7.0.0"
45
45
  },
46
- "gitHead": "10e478c1ceffe1c19a46bf475cd6b46c50d22697"
46
+ "gitHead": "05a56debe3eccdd23ca268523b08912cdbc1205c"
47
47
  }
@@ -5,9 +5,11 @@ export class PropertyException extends PlatformException {
5
5
  constructor(
6
6
  msg: string,
7
7
  details: { propertyMetadata: PropertyMetadata; preparedKey: string },
8
+ cause?: unknown,
8
9
  ) {
9
10
  super('CONFIG:PROPERTY', msg, {
10
11
  details,
12
+ cause,
11
13
  });
12
14
  }
13
15
 
@@ -15,6 +17,10 @@ export class PropertyException extends PlatformException {
15
17
  err: any,
16
18
  details: { propertyMetadata: PropertyMetadata; preparedKey: string },
17
19
  ): PropertyException {
18
- return new PropertyException(err.message || 'UNKNOWN ERROR', details);
20
+ return new PropertyException(
21
+ `${details.preparedKey}: ${err.message}` || 'UNKNOWN ERROR',
22
+ details,
23
+ err,
24
+ );
19
25
  }
20
26
  }