Fix bad message from TimeoutError
Before: Error creating IAM Role my-role: timeout while waiting for state to become 'success'. last error: %!s(<nil>)
This commit is contained in:
parent
041094fb85
commit
9d3f40a513
|
@ -44,9 +44,10 @@ type TimeoutError struct {
|
|||
}
|
||||
|
||||
func (e *TimeoutError) Error() string {
|
||||
return fmt.Sprintf(
|
||||
"timeout while waiting for state to become '%s'. last error: %s",
|
||||
strings.Join(e.ExpectedState, ", "),
|
||||
e.LastError,
|
||||
)
|
||||
msg := fmt.Sprintf("timeout while waiting for state to become '%s'",
|
||||
strings.Join(e.ExpectedState, ", "))
|
||||
if e.LastError != nil {
|
||||
msg += fmt.Sprintf(". last error: %s", e.LastError)
|
||||
}
|
||||
return msg
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue