Versions in this module Expand all Collapse all v0 v0.90.0 Jan 20, 2026 Changes in this version + const CodeAborted + const CodeAlreadyExists + const CodeAuthError + const CodeCacheError + const CodeCancelled + const CodeCompilationError + const CodeConfigError + const CodeConflict + const CodeCryptoError + const CodeDataLoss + const CodeDatabaseError + const CodeDeadlineExceeded + const CodeExecutionError + const CodeFailedPrecondition + const CodeForbidden + const CodeInternal + const CodeInvalidArgument + const CodeNetworkError + const CodeNotFound + const CodeOK + const CodeOutOfRange + const CodePermissionDenied + const CodeRateLimit + const CodeResourceExhausted + const CodeSerializationError + const CodeServiceUnavailable + const CodeStorageError + const CodeTimeout + const CodeUnauthenticated + const CodeUnauthorized + const CodeUnavailable + const CodeUnimplemented + const CodeUnknown + const CodeValidation + var ErrConflict = errors.New("resource already exists") + var ErrForbidden = errors.New("forbidden") + var ErrInternal = errors.New("internal error") + var ErrInvalidInput = errors.New("invalid input") + var ErrNotFound = errors.New("not found") + var ErrServiceUnavailable = errors.New("service unavailable") + var ErrTimeout = errors.New("operation timeout") + var ErrTooManyRequests = errors.New("too many requests") + var ErrUnauthorized = errors.New("unauthorized") + func Cause(err error) error + func GetErrorCode(err error) string + func GetErrorMessage(err error) string + func HTTPStatusToCode(status int) string + func IsClientError(code string) bool + func IsConflict(err error) bool + func IsForbidden(err error) bool + func IsInternal(err error) bool + func IsNotFound(err error) bool + func IsRateLimit(err error) bool + func IsRetryable(code string) bool + func IsServerError(code string) bool + func IsServiceUnavailable(err error) bool + func IsTimeout(err error) bool + func IsUnauthorized(err error) bool + func IsValidation(err error) bool + func New(message string) error + func Newf(format string, args ...interface{}) error + func ShouldRetry(err error) bool + func StatusCode(err error) int + func Wrap(err error, message string) error + func Wrapf(err error, format string, args ...interface{}) error + func WriteHTTPError(w http.ResponseWriter, err error, traceID string) + type BaseError struct + func (e *BaseError) Code() string + func (e *BaseError) Error() string + func (e *BaseError) Message() string + func (e *BaseError) Stack() []uintptr + func (e *BaseError) StackTrace() string + func (e *BaseError) Unwrap() error + type ConflictError struct + Field string + Resource string + Value string + func NewConflictError(resource, field, value string) *ConflictError + type Error interface + Code func() string + Message func() string + Unwrap func() error + type ErrorCategory string + const CategoryAuth + const CategoryClient + const CategoryNetwork + const CategoryServer + const CategoryTimeout + const CategoryValidation + func GetCategory(code string) ErrorCategory + type ForbiddenError struct + Action string + Resource string + func NewForbiddenError(resource, action string) *ForbiddenError + type HTTPError struct + Code string + Details map[string]string + Message string + Status int + TraceID string + func ToHTTPError(err error, traceID string) *HTTPError + func (e *HTTPError) Error() string + type InternalError struct + Operation string + func NewInternalError(message string, cause error) *InternalError + func (e *InternalError) WithOperation(op string) *InternalError + type NotFoundError struct + ID string + Resource string + func NewNotFoundError(resource, id string) *NotFoundError + func (e *NotFoundError) Error() string + type RateLimitError struct + Limit int + RetryAfter int + func NewRateLimitError(limit, retryAfter int) *RateLimitError + type ServiceError struct + Service string + StatusCode int + func NewServiceError(service, message string, statusCode int, cause error) *ServiceError + type TimeoutError struct + Duration string + Operation string + func NewTimeoutError(operation, duration string) *TimeoutError + type UnauthorizedError struct + Realm string + func NewUnauthorizedError(message string) *UnauthorizedError + func (e *UnauthorizedError) WithRealm(realm string) *UnauthorizedError + type ValidationError struct + Field string + Value interface{} + func NewValidationError(field, message string, value interface{}) *ValidationError + func (e *ValidationError) Error() string v0.90.0-nigthly Jan 20, 2026