Documentation
¶
Index ¶
- func IsRetryable(err error) bool
- func WrapAWSError(err error, service, operation string) error
- func WrapSystemError(component string, err error) error
- func WrapValidationError(domain string, err error) error
- type APIError
- type AuthenticationError
- type AuthorizationError
- type BaseError
- type ErrorCategory
- type ExitCode
- type SystemError
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WrapAWSError ¶
WrapAWSError wraps AWS SDK errors with appropriate custom error types
func WrapSystemError ¶
WrapSystemError wraps system-level errors
func WrapValidationError ¶
WrapValidationError wraps domain validation errors
Types ¶
type APIError ¶
APIError represents AWS API call failures
func NewAPIError ¶
func (*APIError) WithRequestID ¶
func (*APIError) WithStatusCode ¶
type AuthenticationError ¶
AuthenticationError represents AWS credential issues
func NewAuthenticationError ¶
func NewAuthenticationError(provider, message string, cause error) *AuthenticationError
func (*AuthenticationError) Error ¶
func (e *AuthenticationError) Error() string
type AuthorizationError ¶
AuthorizationError represents insufficient permissions
func NewAuthorizationError ¶
func NewAuthorizationError(operation, resource, message string, cause error) *AuthorizationError
func (*AuthorizationError) Error ¶
func (e *AuthorizationError) Error() string
type BaseError ¶
type BaseError struct { Category ErrorCategory Message string Cause error Context map[string]interface{} }
BaseError provides common functionality for all custom errors
func (*BaseError) GetCategory ¶
func (e *BaseError) GetCategory() ErrorCategory
func (*BaseError) GetContext ¶
type ErrorCategory ¶
type ErrorCategory string
ErrorCategory represents different categories of errors
const ( CategoryValidation ErrorCategory = "VALIDATION" CategoryAuthentication ErrorCategory = "AUTHENTICATION" CategoryAuthorization ErrorCategory = "AUTHORIZATION" CategoryAPI ErrorCategory = "API" CategorySystem ErrorCategory = "SYSTEM" )
type ExitCode ¶
type ExitCode int
ExitCode represents different exit codes for the CLI
const ( ExitSuccess ExitCode = 0 // Success (domain checked successfully) ExitValidation ExitCode = 1 // Validation error (invalid domain format) ExitAuthentication ExitCode = 2 // Authentication error (AWS credentials issue) ExitAuthorization ExitCode = 3 // Authorization error (insufficient permissions) ExitAPIError ExitCode = 4 // API error (AWS service error) ExitSystemError ExitCode = 5 // System error (unexpected error) )
func GetExitCode ¶
GetExitCode returns the appropriate exit code for an error
type SystemError ¶
SystemError represents unexpected system errors
func NewSystemError ¶
func NewSystemError(component, message string, cause error) *SystemError
func (*SystemError) Error ¶
func (e *SystemError) Error() string
type ValidationError ¶
ValidationError represents domain validation failures
func NewValidationError ¶
func NewValidationError(domain, field, message string, cause error) *ValidationError
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Click to show internal directories.
Click to hide internal directories.