diff --git a/pkg/multicloud/huawei/utils.go b/pkg/multicloud/huawei/utils.go index 09a5923c9f..dbed5a0105 100644 --- a/pkg/multicloud/huawei/utils.go +++ b/pkg/multicloud/huawei/utils.go @@ -180,7 +180,7 @@ func doListPart(doList listFunc, queries map[string]string, result interface{}) func DoGet(doGet getFunc, id string, queries map[string]string, result interface{}) error { if len(id) == 0 { resultType := reflect.Indirect(reflect.ValueOf(result)).Type() - return fmt.Errorf(" Get %s id should not be empty", resultType.Name()) + return errors.Wrap(cloudprovider.ErrNotFound, fmt.Sprintf(" Get %s id should not be empty", resultType.Name())) } ret, err := doGet(id, queries)