mirror of https://github.com/grpc/grpc-node.git
Merge pull request #1878 from murgatroid99/grpc-js_ETIMEDOUT_handling
grpc-js: Map ETIMEDOUT errors to UNAVAILABLE
This commit is contained in:
commit
a0bdbf3fa7
|
@ -601,7 +601,7 @@ export class Http2CallStream implements Call {
|
||||||
* "Internal server error" message. */
|
* "Internal server error" message. */
|
||||||
details = `Received RST_STREAM with code ${stream.rstCode} (Internal server error)`;
|
details = `Received RST_STREAM with code ${stream.rstCode} (Internal server error)`;
|
||||||
} else {
|
} else {
|
||||||
if (this.internalError.code === 'ECONNRESET') {
|
if (this.internalError.code === 'ECONNRESET' || this.internalError.code === 'ETIMEDOUT') {
|
||||||
code = Status.UNAVAILABLE;
|
code = Status.UNAVAILABLE;
|
||||||
details = this.internalError.message;
|
details = this.internalError.message;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue