Be more verbose when connection fails
Wrap the initial error message so we can guess if it's a credential
issue or a server one.
--- a/cmd/madon.go Mon May 01 13:06:31 2017 +0200
+++ b/cmd/madon.go Mon May 01 14:33:57 2017 +0200
@@ -55,7 +55,7 @@
}
// Check instance
if _, err := gClient.GetCurrentInstance(); err != nil {
- return errors.New("could not connect to server with provided app ID/secret")
+ return errors.Wrap(err, "could not connect to server with provided app ID/secret")
}
if verbose {
errPrint("Using provided app ID/secret")