From 6b3ebbb82921e1e42d8a0974a7e900ff606a66cc Mon Sep 17 00:00:00 2001 From: Michael Lumish Date: Thu, 8 Jul 2021 10:27:31 -0700 Subject: [PATCH] grpc-js: Add logging for TLS over proxy connection errors --- packages/grpc-js/package.json | 2 +- packages/grpc-js/src/http_proxy.ts | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/grpc-js/package.json b/packages/grpc-js/package.json index 8acb8a14..97d7e275 100644 --- a/packages/grpc-js/package.json +++ b/packages/grpc-js/package.json @@ -1,6 +1,6 @@ { "name": "@grpc/grpc-js", - "version": "1.3.4", + "version": "1.3.5", "description": "gRPC Library for Node - pure JS implementation", "homepage": "https://grpc.io/", "repository": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js", diff --git a/packages/grpc-js/src/http_proxy.ts b/packages/grpc-js/src/http_proxy.ts index f6921378..8c461d4f 100644 --- a/packages/grpc-js/src/http_proxy.ts +++ b/packages/grpc-js/src/http_proxy.ts @@ -244,7 +244,13 @@ export function getProxiedConnection( resolve({ socket: cts, realTarget: parsedTarget }); } ); - cts.on('error', () => { + cts.on('error', (error: Error) => { + trace('Failed to establish a TLS connection to ' + + options.path + + ' through proxy ' + + proxyAddressString + + ' with error ' + + error.message); reject(); }); } else {