Skip to content

Commit

Permalink
Merge pull request aliyun#6714 from ChenHanZhang/AutoBotDBFSDbfsInsta…
Browse files Browse the repository at this point in the history
…nce20231127

resource/alicloud_dbfs_instance: add resource not found code.
  • Loading branch information
ChenHanZhang authored Nov 27, 2023
2 parents b4c6033 + 9f40b22 commit 00f6522
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions alicloud/service_alicloud_dbfs_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ func (s *DbfsServiceV2) DescribeDbfsDbfsInstance(id string) (object map[string]i
})

if err != nil {
if IsExpectedErrors(err, []string{"EntityNotExist.DBFS"}) {
return object, WrapErrorf(Error(GetNotFoundMessage("DbfsInstance", id)), NotFoundMsg, response)
}
return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR)
}

Expand All @@ -72,6 +75,7 @@ func (s *DbfsServiceV2) DbfsDbfsInstanceStateRefreshFunc(id string, field string

v, err := jsonpath.Get(field, object)
currentStatus := fmt.Sprint(v)

for _, failState := range failStates {
if currentStatus == failState {
return object, currentStatus, WrapError(Error(FailedToReachTargetStatus, currentStatus))
Expand Down

0 comments on commit 00f6522

Please sign in to comment.