improve no more auth err msg (#176)

Improve error message when no viable authentication method is available
This commit is contained in:
Martin 2024-01-10 16:17:02 +01:00 committed by GitHub
parent e7d5b17113
commit 8531e2e36a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -681,7 +681,7 @@ func (c *Client) init(o *Options) error {
}
}
if mechanism == "" {
return fmt.Errorf("PLAIN authentication is not an option: %v", f.Mechanisms.Mechanism)
return fmt.Errorf("no viable authentication method available: %v", f.Mechanisms.Mechanism)
}
// Next message should be either success or failure.
name, val, err := next(c.p)