diff options
author | Alec WM <alec@owls.io> | 2018-03-15 20:50:32 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2018-03-15 20:50:32 +0100 |
commit | db25ee59c5c9a46feed526133bea6b296256a960 (patch) | |
tree | d8a87d382f5d9864673dfe176ca9e8266d572d53 | |
parent | 4b0bc6d0bf562291a45b4ed2d386ee68b68c7945 (diff) | |
download | matterbridge-msglm-db25ee59c5c9a46feed526133bea6b296256a960.tar.gz matterbridge-msglm-db25ee59c5c9a46feed526133bea6b296256a960.tar.bz2 matterbridge-msglm-db25ee59c5c9a46feed526133bea6b296256a960.zip |
Print list of valid team names when team not found (#390)
-rw-r--r-- | matterclient/matterclient.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/matterclient/matterclient.go b/matterclient/matterclient.go index f539a76d..79787917 100644 --- a/matterclient/matterclient.go +++ b/matterclient/matterclient.go @@ -190,7 +190,11 @@ func (m *MMClient) Login() error { } if m.Team == nil { - return errors.New("team not found") + validTeamNames := make([]string, len(m.OtherTeams)) + for i, t := range m.OtherTeams { + validTeamNames[i] = t.Team.Name + } + return fmt.Errorf("Team '%s' not found in %v", m.Credentials.Team, validTeamNames) } m.wsConnect() |