5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-23 00:01:37 +00:00

Return better error messages on mattermost connect

This commit is contained in:
Wim 2017-07-22 18:13:13 +02:00
parent 52fc94c1fe
commit 10dab1366e

View File

@ -112,7 +112,10 @@ func (m *MMClient) Login() error {
for { for {
d := b.Duration() d := b.Duration()
// bogus call to get the serverversion // 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) { if firstConnection && !supportedVersion(m.Client.ServerVersion) {
return fmt.Errorf("unsupported mattermost version: %s", m.Client.ServerVersion) return fmt.Errorf("unsupported mattermost version: %s", m.Client.ServerVersion)
} }