-
Notifications
You must be signed in to change notification settings - Fork 241
Open
Labels
enhancementNew feature or requestNew feature or request
Description
SDK version
...
github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0
Use-cases
In case when the retry func faces an unexpected resource status it returns unexpected state 'ACTIVE', wanted target 'DELETED'. last error: %!s(<nil>)
.
Attempted Solutions
Proposal
There should be more cleaner error report, when LastError is nil: unexpected state 'ACTIVE', wanted target 'DELETED'
, e.g.
func (e *UnexpectedStateError) Error() string {
if e.LastError == nil {
return fmt.Sprintf(
"unexpected state '%s', wanted target '%s'.",
e.State,
strings.Join(e.ExpectedState, ", "),
)
}
return fmt.Sprintf(
"unexpected state '%s', wanted target '%s'. last error: %s",
e.State,
strings.Join(e.ExpectedState, ", "),
e.LastError,
)
}
References
"unexpected state '%s', wanted target '%s'. last error: %s", |
https://github.com/search?q=%22last+error%3A+%25%21s%28%3Cnil%3E%29%22&type=issues
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request