1
0
mirror of https://github.com/rancher/norman.git synced 2025-09-13 05:42:37 +00:00

Only record forgetError if there is no message at all

This commit is contained in:
Darren Shepherd
2018-02-05 21:59:30 -07:00
parent 70200ed19c
commit 339468f119

View File

@@ -153,12 +153,12 @@ func (c Cond) doInternal(obj runtime.Object, f func() (runtime.Object, error)) (
if err != nil {
if _, ok := err.(*controller.ForgetError); ok {
if c.IsFalse(obj) {
c.Unknown(obj)
if c.GetMessage(obj) == "" {
c.ReasonAndMessageFromError(obj, err)
}
} else {
c.False(obj)
return obj, err
}
c.False(obj)
c.ReasonAndMessageFromError(obj, err)
return obj, err
}