Skip to content

Commit 126961a

Browse files
authored
Merge pull request #1780 from murgatroid99/grpc-js_econnreset_error_parsing
grpc-js: Look for ECONNRESET errors by checking the error code
2 parents 21b5ba8 + f009cd7 commit 126961a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/grpc-js/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@grpc/grpc-js",
3-
"version": "1.3.0",
3+
"version": "1.3.1",
44
"description": "gRPC Library for Node - pure JS implementation",
55
"homepage": "https://grpc.io/",
66
"repository": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js",

packages/grpc-js/src/call-stream.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ export class Http2CallStream implements Call {
589589
* "Internal server error" message. */
590590
details = `Received RST_STREAM with code ${stream.rstCode} (Internal server error)`;
591591
} else {
592-
if (this.internalError.errno === os.constants.errno.ECONNRESET) {
592+
if (this.internalError.code === 'ECONNRESET') {
593593
code = Status.UNAVAILABLE;
594594
details = this.internalError.message;
595595
} else {

0 commit comments

Comments
 (0)