Documentation
¶
Overview ¶
Package error provides custom error types for STACKIT Edge Cloud operations.
This package defines structured error types that provide better error handling and type checking compared to simple string errors. Each error type can carry additional context and implements the standard error interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InstanceExistsError ¶
type InstanceExistsError struct {
DisplayName string // Optional: the display name that was searched for
}
InstanceExistsError indicates that a specific instance already exists.
func NewInstanceExistsError ¶
func NewInstanceExistsError(displayName string) *InstanceExistsError
NewInstanceExistsError creates a new InstanceExistsError with optional instance details.
func (*InstanceExistsError) Error ¶
func (e *InstanceExistsError) Error() string
type InvalidIdentifierError ¶
type InvalidIdentifierError struct {
Identifier string // The invalid identifier that was provided
}
InvalidIdentifierError indicates that an unsupported identifier was provided.
func NewInvalidIdentifierError ¶
func NewInvalidIdentifierError(identifier string) *InvalidIdentifierError
NewInvalidIdentifierError creates a new InvalidIdentifierError with the provided identifier.
func (*InvalidIdentifierError) Error ¶
func (e *InvalidIdentifierError) Error() string
type NoIdentifierError ¶
type NoIdentifierError struct {
Operation string // Optional: which operation failed
}
NoIdentifierError indicates that no identifier was provided when one was required.
func NewNoIdentifierError ¶
func NewNoIdentifierError(operation string) *NoIdentifierError
NewNoIdentifierError creates a new NoIdentifierError with optional context.
func (*NoIdentifierError) Error ¶
func (e *NoIdentifierError) Error() string
type NoInstanceError ¶
type NoInstanceError struct {
Context string // Optional: context where no instance was found (e.g., "in response", "in project")
}
NoInstanceError indicates that no instance was provided in a context where one was expected.
func NewNoInstanceError ¶
func NewNoInstanceError(context string) *NoInstanceError
NewNoInstanceError creates a new NoInstanceError with optional context.
func (*NoInstanceError) Error ¶
func (e *NoInstanceError) Error() string