Commit 5d410bdd authored by Henry Huang's avatar Henry Huang

When unexpected state found in waiting, notify the caller func with a correct error message

parent 3a74c469
......@@ -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
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment