Merge pull request #1348 from murgatroid99/grpc-js_proxy_error_reporting

grpc-js: Add more information to proxy errors
This commit is contained in:
Michael Lumish 2020-04-10 11:48:42 -07:00 committed by GitHub
commit 7eca188ae1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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();
});
});