mirror of https://github.com/grpc/grpc-node.git
grpc-js: Add more information to proxy errors
This commit is contained in:
parent
9485062a31
commit
19d960074b
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@grpc/grpc-js",
|
"name": "@grpc/grpc-js",
|
||||||
"version": "0.7.8",
|
"version": "0.7.9",
|
||||||
"description": "gRPC Library for Node - pure JS implementation",
|
"description": "gRPC Library for Node - pure JS implementation",
|
||||||
"homepage": "https://grpc.io/",
|
"homepage": "https://grpc.io/",
|
||||||
"repository": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js",
|
"repository": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js",
|
||||||
|
|
|
@ -149,13 +149,13 @@ export function getProxiedConnection(target: string, subchannelAddress: Subchann
|
||||||
trace('Successfully connected to ' + subchannelAddress + ' through proxy ' + PROXY_INFO.address);
|
trace('Successfully connected to ' + subchannelAddress + ' through proxy ' + PROXY_INFO.address);
|
||||||
resolve(socket);
|
resolve(socket);
|
||||||
} else {
|
} 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();
|
reject();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
request.once('error', (err) => {
|
request.once('error', (err) => {
|
||||||
request.removeAllListeners();
|
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();
|
reject();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue