grpc-js: Add more information to proxy errors

This commit is contained in:
Michael Lumish 2020-04-10 10:09:54 -07:00
parent 9485062a31
commit 19d960074b
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@grpc/grpc-js",
"version": "0.7.8",
"version": "0.7.9",
"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

@ -149,13 +149,13 @@ export function getProxiedConnection(target: string, subchannelAddress: Subchann
trace('Successfully connected to ' + subchannelAddress + ' through proxy ' + PROXY_INFO.address);
resolve(socket);
} else {
log(LogVerbosity.ERROR, 'Failed to connect to ' + subchannelAddress + ' through proxy ' + PROXY_INFO.address);
log(LogVerbosity.ERROR, 'Failed to connect to ' + subchannelAddress + ' through proxy ' + PROXY_INFO.address + ' with status ' + res.statusCode);
reject();
}
});
request.once('error', (err) => {
request.removeAllListeners();
log(LogVerbosity.ERROR, 'Failed to connect to proxy ' + PROXY_INFO.address);
log(LogVerbosity.ERROR, 'Failed to connect to proxy ' + PROXY_INFO.address + ' with error ' + err.message);
reject();
});
});