Skip to content
This repository was archived by the owner on Sep 25, 2020. It is now read-only.

Commit d806f8c

Browse files
committed
Expose errors when ringpop-admin cannot access members
1 parent 411cdd2 commit d806f8c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lib/cluster.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ Cluster.prototype.fetchStats = function fetchStats(callback) {
138138
statsObj.address = memberAddr;
139139

140140
if (err) {
141-
next(null, statsObj);
141+
next(err, statsObj);
142142
return;
143143
}
144144

list.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ function main() {
6262

6363
var cluster = clusterManager.getClusterAt(0);
6464

65+
if (!cluster) {
66+
console.error('Error: no members in the cluster could be reached');
67+
process.exit(1);
68+
}
69+
6570
if (program.members) {
6671
printSorted(cluster.getMemberAddrs());
6772
process.exit();

0 commit comments

Comments
 (0)