juju: github.com/juju/juju/provider/azure/internal/errorutils Index | Files

package errorutils

import "github.com/juju/juju/provider/azure/internal/errorutils"

Index

Package Files

errors.go

func HandleCredentialError Uses

func HandleCredentialError(err error, ctx context.ProviderCallContext) error

HandleCredentialError determines if given error relates to invalid credential. If it is, the credential is invalidated. Original error is returned untouched.

func MaybeInvalidateCredential Uses

func MaybeInvalidateCredential(err error, ctx context.ProviderCallContext) bool

MaybeInvalidateCredential determines if given error is related to authentication/authorisation failures. If an error is related to an invalid credential, then this call will try to invalidate that credential as well.

func ServiceError Uses

func ServiceError(err error) (*azure.ServiceError, bool)

ServiceError returns the *azure.ServiceError underlying the supplied error, if any, and a bool indicating whether one was found.

Package errorutils imports 6 packages (graph) and is imported by 15 packages. Updated 2018-11-29. Refresh now. Tools for package owners.