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 {
|
func (e *TimeoutError) Error() string {
|
||||||
return fmt.Sprintf(
|
msg := fmt.Sprintf("timeout while waiting for state to become '%s'",
|
||||||
"timeout while waiting for state to become '%s'. last error: %s",
|
strings.Join(e.ExpectedState, ", "))
|
||||||
strings.Join(e.ExpectedState, ", "),
|
if e.LastError != nil {
|
||||||
e.LastError,
|
msg += fmt.Sprintf(". last error: %s", e.LastError)
|
||||||
)
|
}
|
||||||
|
return msg
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue