pkg/deploy/error.go (15 lines of code) (raw):

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 }