|
|
79385df87b
|
Implement comprehensive error types and handling
Add complete error handling system for Kanboard API client:
Sentinel errors:
- Network: ErrConnectionFailed, ErrTimeout
- Auth: ErrUnauthorized, ErrForbidden
- Resources: ErrNotFound, ErrProjectNotFound, ErrTaskNotFound,
ErrColumnNotFound, ErrCommentNotFound
- Logic: ErrAlreadyInLastColumn, ErrAlreadyInFirstColumn,
ErrTaskClosed, ErrTaskOpen
- Validation: ErrEmptyTitle, ErrInvalidProjectID
Helper functions:
- IsNotFound() - checks all not-found error variants
- IsUnauthorized() - checks auth errors
- IsAPIError() - checks for API errors via errors.As
All errors support errors.Is/errors.As for proper error
wrapping and context preservation.
Closes: kanboard-api-s7k
|
2026-01-15 18:13:09 +01:00 |
|