errhelp

package
v0.0.0-...-72b2b2c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2024 License: MIT Imports: 9 Imported by: 42

Documentation

Index

Constants

View Source
const (
	AccountNameInvalid                             = "AccountNameInvalid"
	AlreadyExists                                  = "AlreadyExists"
	AsyncOpIncompleteError                         = "AsyncOpIncomplete"
	BadRequest                                     = "BadRequest"
	CannotParseError                               = "CannotParseError"
	ConflictingServerOperation                     = "ConflictingServerOperation"
	ContainerOperationFailure                      = "ContainerOperationFailure"
	ConsumerGroupNotFound                          = "ConsumerGroupNotFound"
	CreationPending                                = "CreationPending"
	FailoverGroupBusy                              = "FailoverGroupBusy"
	Forbidden                                      = "Forbidden"
	InvalidAccessPolicy                            = "InvalidAccessPolicy"
	InvalidCIDRNotation                            = "InvalidCIDRNotation"
	InvalidFailoverGroupRegion                     = "InvalidFailoverGroupRegion"
	InvalidParameters                              = "InvalidParameters"
	InvalidRequestFormat                           = "InvalidRequestFormat"
	InvalidResourceLocation                        = "InvalidResourceLocation"
	InvalidServerName                              = "InvalidServerName"
	InvalidResourceReference                       = "InvalidResourceReference"
	KeyNotFound                                    = "KeyNotFound"
	LocationNotAvailableForResourceType            = "LocationNotAvailableForResourceType"
	ProvisioningDisabled                           = "ProvisioningDisabled"
	NetcfgInvalidIPAddressPrefix                   = "NetcfgInvalidIPAddressPrefix"
	NetcfgInvalidSubnet                            = "NetcfgInvalidSubnet"
	NetcfgInvalidVirtualNetworkSite                = "NetcfgInvalidVirtualNetworkSite"
	NotFoundErrorCode                              = "NotFound"
	NoSuchHost                                     = "no such host"
	ParentNotFoundErrorCode                        = "ParentResourceNotFound"
	StorageAccountIsNotProvisioned                 = "StorageAccountIsNotProvisioned"
	PreconditionFailed                             = "PreconditionFailed"
	QuotaExceeded                                  = "QuotaExceeded"
	ResourceGroupNotFoundErrorCode                 = "ResourceGroupNotFound"
	RegionDoesNotAllowProvisioning                 = "RegionDoesNotAllowProvisioning"
	ResourceNotFound                               = "ResourceNotFound"
	RequestConflictError                           = "Conflict"
	ValidationError                                = "ValidationError"
	SubscriptionDoesNotHaveServer                  = "SubscriptionDoesNotHaveServer"
	NotSupported                                   = "NotSupported"
	SecretNotFound                                 = "SecretNotFound"
	RequestDisallowedByPolicy                      = "RequestDisallowedByPolicy"
	ServiceBusy                                    = "ServiceBusy"
	NameNotAvailable                               = "NameNotAvailable"
	PublicIPIdleTimeoutIsOutOfRange                = "PublicIPIdleTimeoutIsOutOfRange"
	InvalidRequestContent                          = "InvalidRequestContent"
	InvalidMaxSizeTierCombination                  = "InvalidMaxSizeTierCombination"
	InternalServerError                            = "InternalServerError"
	NetworkAclsValidationFailure                   = "NetworkAclsValidationFailure"
	SubnetHasServiceEndpointWithInvalidServiceName = "SubnetHasServiceEndpointWithInvalidServiceName"
	InvalidAddressPrefixFormat                     = "InvalidAddressPrefixFormat"
	FeatureNotSupportedForEdition                  = "FeatureNotSupportedForEdition"
	VirtualNetworkRuleBadRequest                   = "VirtualNetworkRuleBadRequest"
	LongTermRetentionPolicyInvalid                 = "LongTermRetentionPolicyInvalid"
	BackupRetentionPolicyInvalid                   = "InvalidBackupRetentionPeriod"
	OperationIdNotFound                            = "OperationIdNotFound"
	ObjectIsBeingDeleted                           = "ObjectIsBeingDeleted"
	ObjectIsDeletedButRecoverable                  = "ObjectIsDeletedButRecoverable"
)

Variables

View Source
var ErrIdsRegex *regexp.Regexp

ErrIdsRegex is used to find and remove uuids from errors

View Source
var ErrTimesRegex *regexp.Regexp

ErrTimesRegex allows timestamp seconds to be removed from error strings

Functions

func IsErrorFatal

func IsErrorFatal(err error, allowedErrorTypes []string, unrecoverableErrorTypes []string) (bool, error)

IsErrorFatal checks the given error against the provided list of allowed and unrecoverable error types.

  • Allowed errors are NOT fatal and no error is returned. When returned to the async_reconciler this means that reconciliation is reattempted.
  • Unrecoverable errors are fatal. When returned to the async_reconciler reconciliation is stopped until a new modification is made to the resource in question. This is useful for things like client errors that no amount of reconciliation will fix.

If an error is not in the allowed list and also not in the unrecoverable list, it is classified as nonfatal, but an error is returned. When returned to the async_reconciler, reconciliation will continue but an error will be logged.

func StripErrorIDs

func StripErrorIDs(err error) string

StripErrorIDs takes an error and returns its string representation after filtering some common ID patterns

func StripErrorTimes

func StripErrorTimes(err string) string

StripErrorTimes removes the hours:minutes:seconds from a date to prevent updates to Status.Message from changing unnecessarily

Types

type AdminSecretNotFound

type AdminSecretNotFound struct {
	Name string
}

func NewAdminSecretNotFoundError

func NewAdminSecretNotFoundError(name string) *AdminSecretNotFound

func (AdminSecretNotFound) Error

func (e AdminSecretNotFound) Error() string

type AzureError

type AzureError struct {
	Type     string
	Reason   string
	Code     int
	Original error
}

func NewAzureError

func NewAzureError(err error) *AzureError

func (AzureError) Error

func (e AzureError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL