Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotAuthenticated = errors.New("not authenticated") ErrNoActiveDevice = errors.New("no active device") ErrDeviceNotFound = errors.New("device not found") ErrTrackNotFound = errors.New("track not found") ErrPremiumRequired = errors.New("spotify premium required") ErrRateLimited = errors.New("rate limited") ErrNetworkError = errors.New("network error") ErrTimeout = errors.New("request timeout") ErrConfigNotFound = errors.New("config file not found") ErrInvalidConfig = errors.New("invalid configuration") )
Error types for common failure scenarios.
Functions ¶
func GetSuggestion ¶
GetSuggestion returns a suggestion for the given error.
func WithSuggestion ¶
WithSuggestion wraps an error with a helpful suggestion.
Types ¶
type PartialResult ¶
PartialResult represents a result that may have partial failures.
func (*PartialResult[T]) AddError ¶
func (p *PartialResult[T]) AddError(err error)
AddError adds an error to the partial result.
func (*PartialResult[T]) ErrorSummary ¶
func (p *PartialResult[T]) ErrorSummary() string
ErrorSummary returns a summary of all errors.
func (*PartialResult[T]) HasErrors ¶
func (p *PartialResult[T]) HasErrors() bool
HasErrors returns true if there were any errors.
Click to show internal directories.
Click to hide internal directories.