grpc-js: Map ETIMEDOUT errors to UNAVAILABLE

This commit is contained in:
Michael Lumish 2021-08-10 14:20:11 -07:00
parent 0702068b26
commit 875f483cf6
1 changed files with 1 additions and 1 deletions

View File

@ -601,7 +601,7 @@ export class Http2CallStream implements Call {
* "Internal server error" message. */
details = `Received RST_STREAM with code ${stream.rstCode} (Internal server error)`;
} else {
if (this.internalError.code === 'ECONNRESET') {
if (this.internalError.code === 'ECONNRESET' || this.internalError.code === 'ETIMEDOUT') {
code = Status.UNAVAILABLE;
details = this.internalError.message;
} else {