From 10dab1366e023ba5327ffd8d262a1ff8121764a2 Mon Sep 17 00:00:00 2001 From: Wim Date: Sat, 22 Jul 2017 18:13:13 +0200 Subject: Return better error messages on mattermost connect --- matterclient/matterclient.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'matterclient') diff --git a/matterclient/matterclient.go b/matterclient/matterclient.go index 75d883f3..7ca7a0b1 100644 --- a/matterclient/matterclient.go +++ b/matterclient/matterclient.go @@ -112,7 +112,10 @@ func (m *MMClient) Login() error { for { d := b.Duration() // bogus call to get the serverversion - m.Client.GetClientProperties() + _, err := m.Client.GetClientProperties() + if err != nil { + return fmt.Errorf("%#v", err.Error()) + } if firstConnection && !supportedVersion(m.Client.ServerVersion) { return fmt.Errorf("unsupported mattermost version: %s", m.Client.ServerVersion) } -- cgit v1.2.3