Documentation
¶
Index ¶
Constants ¶
View Source
const ( ErrTypeValidation = "validation" ErrTypeConfig = "configuration" ErrTypeExecution = "execution" )
Error types for different categories of errors
View Source
const ( ErrCodeInvalidConfig = "INVALID_CONFIG" ErrCodeCommandFailed = "COMMAND_FAILED" ErrCodePermissionDenied = "PERMISSION_DENIED" )
Error codes for specific error conditions
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MoleyError ¶
type MoleyError struct {
Type string `json:"type"`
Code string `json:"code"`
Message string `json:"message"`
Details map[string]string `json:"details,omitempty"`
Underlying error `json:"-"`
Context map[string]string `json:"context,omitempty"`
}
MoleyError represents a structured error with additional context
func NewConfigError ¶
func NewConfigError(code, message string, underlying error) *MoleyError
NewConfigError creates a new configuration error
func NewExecutionError ¶
func NewExecutionError(code, message string, underlying error) *MoleyError
NewExecutionError creates a new execution error
func NewValidationError ¶
func NewValidationError(code, message string, underlying error) *MoleyError
NewValidationError creates a new validation error
Click to show internal directories.
Click to hide internal directories.