Github user robertkowalski commented on a diff in the pull request:
https://github.com/apache/couchdb-nmo/pull/2#discussion_r38856360
--- Diff: src/isonline.js ---
@@ -37,6 +41,13 @@ function isOnlineCli (...urls) {
});
}
+export function getClusterUrls (clusterName) {
+ const nodes = nmo.config.get(clusterName);
+ if (!nodes) {
+ throw new Error('Cluster does not exist');
--- End diff --
can you set the error type to EUSAGE?
using EUSAGE as error type hides the long stacktrace and the message that
the user should submit an issue in the bugtracker
example:
https://github.com/garrensmith/couchdb-nmo/blob/isonline-cluster/src/isonline.js#L14
code handling error types:
https://github.com/garrensmith/couchdb-nmo/blob/isonline-cluster/bin/nmo-cli.js#L39-L59
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---