Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotAuthenticated indicates the user is not authenticated ErrNotAuthenticated = errors.New("not authenticated: please run 'cu auth login'") // ErrTokenExpired indicates the authentication token has expired ErrTokenExpired = errors.New("authentication token expired: please run 'cu auth login' again") // ErrInvalidToken indicates the token is invalid ErrInvalidToken = errors.New("invalid authentication token") // ErrNetworkError indicates a network error occurred ErrNetworkError = errors.New("network error") // ErrRateLimited indicates the API rate limit was exceeded ErrRateLimited = errors.New("rate limit exceeded") // ErrNotFound indicates the requested resource was not found ErrNotFound = errors.New("resource not found") // ErrInvalidInput indicates invalid user input ErrInvalidInput = errors.New("invalid input") // ErrConfigNotFound indicates the configuration was not found ErrConfigNotFound = errors.New("configuration not found") )
Error types
Functions ¶
func HandleHTTPError ¶
HandleHTTPError converts HTTP status codes to appropriate errors
Types ¶
type APIError ¶
type APIError struct {
StatusCode int `json:"status_code"`
Message string `json:"message"`
Details string `json:"details,omitempty"`
}
APIError represents an error from the ClickUp API
func NewAPIError ¶
NewAPIError creates a new API error
type UserError ¶
UserError represents a user-friendly error message
func NewUserError ¶
NewUserError creates a new user-friendly error
Click to show internal directories.
Click to hide internal directories.