Skip to content

Commit 875f483

Browse files
committed
grpc-js: Map ETIMEDOUT errors to UNAVAILABLE
1 parent 0702068 commit 875f483

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ export class Http2CallStream implements Call {
601601
* "Internal server error" message. */
602602
details = `Received RST_STREAM with code ${stream.rstCode} (Internal server error)`;
603603
} else {
604-
if (this.internalError.code === 'ECONNRESET') {
604+
if (this.internalError.code === 'ECONNRESET' || this.internalError.code === 'ETIMEDOUT') {
605605
code = Status.UNAVAILABLE;
606606
details = this.internalError.message;
607607
} else {

0 commit comments

Comments
 (0)