Documentation
¶
Index ¶
- func EnhanceAPIError(err error, ctx APIErrorContext) error
- func ExtractStatusCodeFromError(err error) int
- func FormatConfigurationError(filePath string, lineNumber int, issue string) error
- func FormatDependencyError(resourceType, resourceName, dependencyType, dependencyRef string) error
- func FormatNetworkError(operation, resourceType, resourceName string, err error) error
- func FormatProtectionError(resourceType, resourceName, operation string) error
- func FormatResourceError(operation, resourceType, resourceName, namespace string, err error) error
- func FormatValidationError(resourceType, resourceName, field, issue string) error
- func IsAuthError(_ error, statusCode int) bool
- func IsConflictError(err error, statusCode int) bool
- func IsRateLimitError(_ error, statusCode int) bool
- func IsValidationError(err error, statusCode int) bool
- func WithResourceContext(err error, ctx ResourceContext) error
- type APIErrorContext
- type ResourceContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnhanceAPIError ¶
func EnhanceAPIError(err error, ctx APIErrorContext) error
EnhanceAPIError enhances an API error with context and helpful hints
func ExtractStatusCodeFromError ¶
ExtractStatusCodeFromError attempts to extract HTTP status code from an error
func FormatConfigurationError ¶
FormatConfigurationError formats configuration parsing errors with file context
func FormatDependencyError ¶
FormatDependencyError formats dependency resolution errors
func FormatNetworkError ¶
FormatNetworkError formats network-related errors with retry suggestions
func FormatProtectionError ¶
FormatProtectionError formats protection violation errors
func FormatResourceError ¶
FormatResourceError creates a formatted error message with resource context
func FormatValidationError ¶
FormatValidationError formats validation errors with clear context
func IsAuthError ¶
IsAuthError checks if an error indicates authentication/authorization failure
func IsConflictError ¶
IsConflictError checks if an error indicates a resource conflict (name already exists)
func IsRateLimitError ¶
IsRateLimitError checks if an error indicates rate limiting
func IsValidationError ¶
IsValidationError checks if an error indicates validation failure
func WithResourceContext ¶
func WithResourceContext(err error, ctx ResourceContext) error
WithResourceContext adds resource context to an error