зеркало из https://github.com/Azure/ARO-RP.git
21 строка
512 B
Go
21 строка
512 B
Go
|
package deploy
|
||
|
|
||
|
// Copyright (c) Microsoft Corporation.
|
||
|
// Licensed under the Apache License 2.0.
|
||
|
|
||
|
import (
|
||
|
"github.com/Azure/go-autorest/autorest"
|
||
|
"github.com/Azure/go-autorest/autorest/azure"
|
||
|
)
|
||
|
|
||
|
func isDeploymentNotFoundError(err error) bool {
|
||
|
if detailedErr, ok := err.(autorest.DetailedError); ok {
|
||
|
if requestErr, ok := detailedErr.Original.(*azure.RequestError); ok &&
|
||
|
requestErr.ServiceError != nil &&
|
||
|
requestErr.ServiceError.Code == "DeploymentNotFound" {
|
||
|
return true
|
||
|
}
|
||
|
}
|
||
|
return false
|
||
|
}
|