ARO-RP/pkg/deploy/error.go

21 строка
512 B
Go
Исходник Обычный вид История

2020-03-02 16:10:46 +03:00
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
}