mirror of https://github.com/grpc/grpc-node.git
Merge pull request #2210 from murgatroid99/grpc-js_status_decode_error_fix
grpc-js: Handle errors when decoding status details
This commit is contained in:
commit
77950142ff
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@grpc/grpc-js",
|
||||
"version": "1.6.10",
|
||||
"version": "1.6.11",
|
||||
"description": "gRPC Library for Node - pure JS implementation",
|
||||
"homepage": "https://grpc.io/",
|
||||
"repository": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js",
|
||||
|
|
|
@ -488,7 +488,11 @@ export class Http2CallStream implements Call {
|
|||
}
|
||||
let details = '';
|
||||
if (typeof metadataMap['grpc-message'] === 'string') {
|
||||
details = decodeURI(metadataMap['grpc-message']);
|
||||
try {
|
||||
details = decodeURI(metadataMap['grpc-message']);
|
||||
} catch (e) {
|
||||
details = metadataMap['grpc-messages'] as string;
|
||||
}
|
||||
metadata.remove('grpc-message');
|
||||
this.trace(
|
||||
'received status details string "' + details + '" from server'
|
||||
|
|
Loading…
Reference in New Issue