@rsdk/http.server 5.3.0-next.2 → 5.3.0-next.4

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,18 @@
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
+ ## [5.3.0-next.4](https://github.com/R-Vision/rsdk/compare/v5.3.0-next.3...v5.3.0-next.4) (2024-11-05)
7
+
8
+ **Note:** Version bump only for package @rsdk/http.server
9
+
10
+ ## [5.3.0-next.3](https://github.com/R-Vision/rsdk/compare/v5.3.0-next.2...v5.3.0-next.3) (2024-11-01)
11
+
12
+ ### Bug Fixes
13
+
14
+ * added details in errors permanently ([f7f3e7b](https://github.com/R-Vision/rsdk/commit/f7f3e7b8ae54a4957fb08327181a20caccd8a63d))
15
+ * remove stacktrace filter ([3c42faa](https://github.com/R-Vision/rsdk/commit/3c42faaa4f307838e53bb8326a494887c8874e5d))
16
+ * remove stacktrace from details ([769d51a](https://github.com/R-Vision/rsdk/commit/769d51a65ed5fbd5c448509139897129985b9d72))
17
+
6
18
  ## [5.3.0-next.2](https://github.com/R-Vision/rsdk/compare/v5.3.0-next.1...v5.3.0-next.2) (2024-10-31)
7
19
 
8
20
  **Note:** Version bump only for package @rsdk/http.server
@@ -26,19 +26,18 @@ class HttpErrorsFormatter {
26
26
  const status = this.statusMap[ex.kind];
27
27
  const { code, details } = ex;
28
28
  const message = formatVerbose
29
- ? [ex.message, ...core_1.PipelineException.innerMessages(ex)].join(' > ')
29
+ ? [
30
+ ex.message,
31
+ ...core_1.PipelineException.innerMessages(ex).map((msg) => msg.replace(ex.message, '').trim().replace(/:$/, '')),
32
+ ].join(' > ')
30
33
  : DEFAULT_MESSAGE;
31
34
  return {
32
35
  code,
33
36
  message,
34
37
  status,
35
38
  success: false,
36
- ...(verbose && {
37
- details: (0, common_2.normalizer)()(details, {
38
- // This means stacktrace will never be sent to user
39
- filterKeys: ['stack'],
40
- sortKeys: common_2.sortErrorKeys,
41
- }),
39
+ details: (0, common_2.normalizer)()(details, {
40
+ sortKeys: common_2.sortErrorKeys,
42
41
  }),
43
42
  };
44
43
  }
@@ -49,6 +48,9 @@ class HttpErrorsFormatter {
49
48
  message,
50
49
  status: common_1.HttpStatus.INTERNAL_SERVER_ERROR,
51
50
  success: false,
51
+ details: (0, common_2.normalizer)()(ex?.details, {
52
+ sortKeys: common_2.sortErrorKeys,
53
+ }),
52
54
  };
53
55
  }
54
56
  }
@@ -1 +1 @@
1
- {"version":3,"file":"http-errors.formatter.js","sourceRoot":"","sources":["../../src/error-handling/http-errors.formatter.ts"],"names":[],"mappings":";;;AAAA,2CAA4C;AAC5C,yCAAyD;AAEzD,qCAA8D;AAW9D,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,CAAC,oBAAa,CAAC,KAAK,CAAC,CAAC,CAAC;AACtD,MAAM,eAAe,GAAG,sBAAsB,CAAC;AAa/C,MAAa,mBAAmB;IAC9B,QAAQ,GAAG,MAAM,CAAC;IACD,SAAS,GAAsC;QAC9D,CAAC,oBAAa,CAAC,cAAc,CAAC,EAAE,mBAAU,CAAC,YAAY;QACvD,CAAC,oBAAa,CAAC,WAAW,CAAC,EAAE,mBAAU,CAAC,SAAS;QACjD,CAAC,oBAAa,CAAC,QAAQ,CAAC,EAAE,mBAAU,CAAC,QAAQ;QAC7C,CAAC,oBAAa,CAAC,KAAK,CAAC,EAAE,mBAAU,CAAC,WAAW;QAC7C,CAAC,oBAAa,CAAC,OAAO,CAAC,EAAE,mBAAU,CAAC,eAAe;QACnD,CAAC,oBAAa,CAAC,QAAQ,CAAC,EAAE,mBAAU,CAAC,qBAAqB;QAC1D,CAAC,oBAAa,CAAC,WAAW,CAAC,EAAE,mBAAU,CAAC,QAAQ;QAChD,CAAC,oBAAa,CAAC,SAAS,CAAC,EAAE,mBAAU,CAAC,SAAS;QAC/C,CAAC,oBAAa,CAAC,W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E,GAAG,EAAE,CAAC;YAE7B,MAAM,OAAO,GAAG,aAAa;gBAC3B,CAAC,CAAC;oBACE,EAAE,CAAC,OAAO;oBACV,GAAG,wBAAiB,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CACjD,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CACrD;iBACF,CAAC,IAAI,CAAC,KAAK,CAAC;gBACf,CAAC,CAAC,eAAe,CAAC;YAEpB,OAAO;gBACL,IAAI;gBACJ,OAAO;gBACP,MAAM;gBACN,OAAO,EAAE,KAAK;gBACd,OAAO,EAAE,IAAA,mBAAU,GAAE,CAAC,OAAO,EAAE;oBAC7B,QAAQ,EAAE,sBAAa;iBACxB,CAAW;aACb,CAAC;QACJ,CAAC;QAED,MAAM,OAAO,GAAG,OAAO;YACrB,CAAC,CAAE,EAAU,CAAC,OAAO,IAAI,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;YAC3C,CAAC,CAAC,eAAe,CAAC;QAEpB,OAAO;YACL,OAAO;YACP,MAAM,EAAE,mBAAU,CAAC,qBAAqB;YACxC,OAAO,EAAE,KAAK;YACd,OAAO,EAAE,IAAA,mBAAU,GAAE,CAAE,EAAU,EAAE,OAAO,EAAE;gBAC1C,QAAQ,EAAE,sBAAa;aACxB,CAAW;SACb,CAAC;IACJ,CAAC;CACF;AAvDD,kDAuDC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsdk/http.server",
3
- "version": "5.3.0-next.2",
3
+ "version": "5.3.0-next.4",
4
4
  "description": "HTTP transport for rsdk apps (needs some of HTTP adapters)",
5
5
  "license": "Apache License 2.0",
6
6
  "publishConfig": {
@@ -22,5 +22,5 @@
22
22
  "reflect-metadata": "^0.1.12 || ^0.2.0",
23
23
  "rxjs": "^7.8.1"
24
24
  },
25
- "gitHead": "9b49dd4bf045a1a4c9ab68a2eead229c284390e3"
25
+ "gitHead": "6d80aacd87b9cc36cfcff8c0c050e4fe31810276"
26
26
  }
@@ -49,7 +49,12 @@ export class HttpErrorsFormatter implements IErrorsFormatter {
49
49
  const { code, details } = ex;
50
50
 
51
51
  const message = formatVerbose
52
- ? [ex.message, ...PipelineException.innerMessages(ex)].join(' > ')
52
+ ? [
53
+ ex.message,
54
+ ...PipelineException.innerMessages(ex).map((msg) =>
55
+ msg.replace(ex.message, '').trim().replace(/:$/, ''),
56
+ ),
57
+ ].join(' > ')
53
58
  : DEFAULT_MESSAGE;
54
59
 
55
60
  return {
@@ -57,13 +62,9 @@ export class HttpErrorsFormatter implements IErrorsFormatter {
57
62
  message,
58
63
  status,
59
64
  success: false,
60
- ...(verbose && {
61
- details: normalizer()(details, {
62
- // This means stacktrace will never be sent to user
63
- filterKeys: ['stack'],
64
- sortKeys: sortErrorKeys,
65
- }) as object,
66
- }),
65
+ details: normalizer()(details, {
66
+ sortKeys: sortErrorKeys,
67
+ }) as object,
67
68
  };
68
69
  }
69
70
 
@@ -75,6 +76,9 @@ export class HttpErrorsFormatter implements IErrorsFormatter {
75
76
  message,
76
77
  status: HttpStatus.INTERNAL_SERVER_ERROR,
77
78
  success: false,
79
+ details: normalizer()((ex as any)?.details, {
80
+ sortKeys: sortErrorKeys,
81
+ }) as object,
78
82
  };
79
83
  }
80
84
  }