Skip to content

Commit

Permalink
Bug#802#HandleValidataionErrorStorageAccount
Browse files Browse the repository at this point in the history
  • Loading branch information
buhongw7583c committed Apr 2, 2020
1 parent 7188c46 commit 2773a2c
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,15 @@ func (sa *azureStorageManager) Delete(ctx context.Context, obj runtime.Object, o
groupName := instance.Spec.ResourceGroup
_, err = sa.DeleteStorage(ctx, groupName, name)
if err != nil {
catch := []string{
errhelp.ValidationError,
}
err = errhelp.NewAzureError(err)
if azerr, ok := err.(*errhelp.AzureError); ok {
if helpers.ContainsString(catch, azerr.Type) {
return false, nil
}
}
return true, err
}

Expand Down

0 comments on commit 2773a2c

Please sign in to comment.