@rsdk/grpc.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,16 @@
|
|
|
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/grpc.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
|
+
|
|
6
16
|
## [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
17
|
|
|
8
18
|
**Note:** Version bump only for package @rsdk/grpc.server
|
|
@@ -45,12 +45,15 @@ class GrpcErrorsFormatter {
|
|
|
45
45
|
format(ex, verboseErrors) {
|
|
46
46
|
if (ex instanceof core_1.PipelineException) {
|
|
47
47
|
const message = verboseErrors
|
|
48
|
-
? [
|
|
48
|
+
? [
|
|
49
|
+
ex.message,
|
|
50
|
+
...core_1.PipelineException.innerMessages(ex).map((msg) => msg.replace(ex.message, '').trim().replace(/:$/, '')),
|
|
51
|
+
].join(': ')
|
|
49
52
|
: core_1.ExceptionKind[ex.kind].toString();
|
|
50
53
|
return {
|
|
51
54
|
code: this.statusMap[ex.kind],
|
|
52
55
|
message,
|
|
53
|
-
details:
|
|
56
|
+
details: ex.details || {},
|
|
54
57
|
kind: ex.kind,
|
|
55
58
|
exceptionCode: ex.code.toString(),
|
|
56
59
|
};
|
|
@@ -61,7 +64,7 @@ class GrpcErrorsFormatter {
|
|
|
61
64
|
message: verboseErrors
|
|
62
65
|
? ex?.message ?? defaultExMessage
|
|
63
66
|
: defaultExMessage,
|
|
64
|
-
details:
|
|
67
|
+
details: ex?.details ?? {},
|
|
65
68
|
kind: ex?.kind ?? GrpcErrorsFormatter.defaultKind,
|
|
66
69
|
exceptionCode: ex?.code?.toString(),
|
|
67
70
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grpc-errors.formatter.js","sourceRoot":"","sources":["../src/grpc-errors.formatter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AAEtC,qCAA8D;AAE9D,2CAA4C;AAG5C,MAAa,mBAAmB;IAC9B,MAAM,CAAU,WAAW,GAAG,oBAAa,CAAC,OAAO,CAAC;IACpD,QAAQ,GAAG,yBAAa,CAAC;IACR,SAAS,GAAuC;QAC/D,CAAC,oBAAa,CAAC,cAAc,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,eAAe;QAC3D,CAAC,oBAAa,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,iBAAiB;QAC1D,CAAC,oBAAa,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,mBAAmB;QACzD,CAAC,oBAAa,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,gBAAgB;QACnD,CAAC,oBAAa,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,iBAAiB;QACtD,CAAC,oBAAa,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ;QAC9C,CAAC,oBAAa,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,cAAc;QACvD,CAAC,oBAAa,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,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mB,CAAC,WAAW;YAC1D,aAAa,EAAG,EAAU,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC7C,CAAC;IACJ,CAAC;;AA/CH,kDAgDC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdk/grpc.server",
|
|
3
|
-
"version": "5.3.0-next.
|
|
3
|
+
"version": "5.3.0-next.4",
|
|
4
4
|
"description": "Grpc transport for platform, clients and common grpc stuff",
|
|
5
5
|
"license": "Apache License 2.0",
|
|
6
6
|
"publishConfig": {
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@bufbuild/protobuf": "^1.4.2"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "6d80aacd87b9cc36cfcff8c0c050e4fe31810276"
|
|
32
32
|
}
|
|
@@ -24,13 +24,18 @@ export class GrpcErrorsFormatter implements IErrorsFormatter {
|
|
|
24
24
|
format(ex: unknown, verboseErrors?: boolean): FormattedGrpcError {
|
|
25
25
|
if (ex instanceof PipelineException) {
|
|
26
26
|
const message = verboseErrors
|
|
27
|
-
? [
|
|
27
|
+
? [
|
|
28
|
+
ex.message,
|
|
29
|
+
...PipelineException.innerMessages(ex).map((msg) =>
|
|
30
|
+
msg.replace(ex.message, '').trim().replace(/:$/, ''),
|
|
31
|
+
),
|
|
32
|
+
].join(': ')
|
|
28
33
|
: ExceptionKind[ex.kind].toString();
|
|
29
34
|
|
|
30
35
|
return {
|
|
31
36
|
code: this.statusMap[ex.kind],
|
|
32
37
|
message,
|
|
33
|
-
details:
|
|
38
|
+
details: ex.details || {},
|
|
34
39
|
kind: ex.kind,
|
|
35
40
|
exceptionCode: ex.code.toString(),
|
|
36
41
|
};
|
|
@@ -43,7 +48,7 @@ export class GrpcErrorsFormatter implements IErrorsFormatter {
|
|
|
43
48
|
message: verboseErrors
|
|
44
49
|
? (ex as any)?.message ?? defaultExMessage
|
|
45
50
|
: defaultExMessage,
|
|
46
|
-
details:
|
|
51
|
+
details: (ex as any)?.details ?? {},
|
|
47
52
|
kind: (ex as any)?.kind ?? GrpcErrorsFormatter.defaultKind,
|
|
48
53
|
exceptionCode: (ex as any)?.code?.toString(),
|
|
49
54
|
};
|