зеркало из https://github.com/Azure/ARO-RP.git
Use IsNotFoundError helper function to identify FIC not found error
This commit is contained in:
Родитель
e208003497
Коммит
5942190f72
|
@ -6,14 +6,12 @@ package cluster
|
|||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"sort"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/msi/armmsi"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob"
|
||||
mgmtnetwork "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-08-01/network"
|
||||
|
@ -427,8 +425,7 @@ func (m *manager) deleteFederatedCredentials(ctx context.Context) error {
|
|||
&armmsi.FederatedIdentityCredentialsClientDeleteOptions{},
|
||||
)
|
||||
if err != nil {
|
||||
var respErr *azcore.ResponseError
|
||||
if errors.As(err, &respErr); respErr.StatusCode == http.StatusNotFound {
|
||||
if azuresdkerrors.IsNotFoundError(err) {
|
||||
m.log.Errorf("federated identity credentials not found for %s: %v", identity.ResourceID, err.Error())
|
||||
continue
|
||||
} else {
|
||||
|
|
Загрузка…
Ссылка в новой задаче