Merge pull request #1878 from murgatroid99/grpc-js_ETIMEDOUT_handling

grpc-js: Map ETIMEDOUT errors to UNAVAILABLE
This commit is contained in:
Michael Lumish 2021-08-10 15:07:59 -07:00 committed by GitHub
commit a0bdbf3fa7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 {