When unexpected state found in waiting, notify the caller func with a correct error message
This commit is contained in:
parent
3a74c469e5
commit
5d410bddc9
|
@ -151,8 +151,8 @@ func WaitForState(conf *StateChangeConf) (i interface{}, err error) {
|
|||
}
|
||||
|
||||
if !found {
|
||||
fmt.Errorf("unexpected state '%s', wanted target '%s'", currentState, conf.Target)
|
||||
return
|
||||
err := fmt.Errorf("unexpected state '%s', wanted target '%s'", currentState, conf.Target)
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue