grpc-js: Add logging for TLS over proxy connection errors

This commit is contained in:
Michael Lumish 2021-07-08 10:27:31 -07:00
parent f5eb9ccbb4
commit 6b3ebbb829
2 changed files with 8 additions and 2 deletions

View File

@ -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",

View File

@ -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 {