When reauthentication fails, the ErrUnableToReauthenticate struct contains only the initial openstack service error and the keystone error is missed:
|
err = client.Reauthenticate(prereqtok) |
|
if err != nil { |
|
e := &ErrUnableToReauthenticate{} |
|
e.ErrOriginal = respErr |
|
return nil, e |
|
} |
Since we don't catch the keystone error response, it is impossible to debug what was wrong during the reauth.
I propose to add ErrReauth struct member and print it along the service error, e.g.
func (e ErrUnableToReauthenticate) Error() string {
e.DefaultErrString = fmt.Sprintf("Unable to re-authenticate: %s: %s", e.ErrOriginal, e.ErrReauth)
return e.choseErrString()
}
Alternatively use the Info member:
err = client.Reauthenticate(prereqtok)
if err != nil {
e := &ErrUnableToReauthenticate{}
e.ErrOriginal = respErr
e.Info = err.Error()
return nil, e
}
When reauthentication fails, the
ErrUnableToReauthenticatestruct contains only the initial openstack service error and the keystone error is missed:gophercloud/provider_client.go
Lines 474 to 479 in 492ab2c
Since we don't catch the keystone error response, it is impossible to debug what was wrong during the reauth.
I propose to add
ErrReauthstruct member and print it along the service error, e.g.Alternatively use the
Infomember: