Versions in this module Expand all Collapse all v1 v1.0.0 Jan 8, 2026 Changes in this version + const CodeAccessDenied + const CodeAuthRequired + const CodeConfigurationError + const CodeDatabaseConnection + const CodeDatabaseConstraint + const CodeDatabaseError + const CodeExternalError + const CodeExternalTimeout + const CodeExternalUnavailable + const CodeInsufficientPermissions + const CodeInsufficientRole + const CodeInternalError + const CodeInternalTimeout + const CodeInvalidCredentials + const CodeInvalidFormat + const CodeInvalidInput + const CodeInvalidOrgContext + const CodeInvalidRange + const CodeInvalidUserContext + const CodeLoginRequired + const CodeOperationCanceled + const CodeOrgContextMissing + const CodePermissionCheckFailed + const CodeRateLimitExceeded + const CodeRequiredField + const CodeResourceExists + const CodeResourceForbidden + const CodeResourceNotFound + const CodeServiceUnavailable + const CodeTokenExpired + const CodeTokenInvalid + const CodeUserRoleNotFound + const CodeValidationError + const MsgAuthRequired + const MsgInsufficientPermissions + const MsgInsufficientRole + const MsgInvalidCredentials + const MsgInvalidOrgContext + const MsgInvalidUserContext + const MsgOrgContextMissing + const MsgPermissionCheckFailed + const MsgUnknownError + const MsgUserRoleNotFound + const StatusInternalServerError + func IsAppError(err error) bool + func IsRecordNotFound(err error) bool + type AppError struct + Code string + Details string + HTTPStatus int + Message string + Type ErrorType + func AsAppError(err error) (*AppError, bool) + func New(message string) *AppError + func NewAppError(errorType ErrorType, code, message string) *AppError + func Wrap(err error, message string) *AppError + func (e *AppError) AsAccessDenied() *AppError + func (e *AppError) AsAuthentication() *AppError + func (e *AppError) AsAuthenticationWithCode(code string) *AppError + func (e *AppError) AsAuthorizationWithCode(code string) *AppError + func (e *AppError) AsConfiguration() *AppError + func (e *AppError) AsConflictWithCode(code string) *AppError + func (e *AppError) AsDatabaseConnection() *AppError + func (e *AppError) AsDatabaseConstraint() *AppError + func (e *AppError) AsDatabaseError() *AppError + func (e *AppError) AsDatabaseTimeout() *AppError + func (e *AppError) AsExternalServiceUnavailable() *AppError + func (e *AppError) AsExternalWithCode(code string) *AppError + func (e *AppError) AsInsufficientPermissions() *AppError + func (e *AppError) AsInternalWithCode(code string) *AppError + func (e *AppError) AsInvalidCredentials() *AppError + func (e *AppError) AsInvalidFormat() *AppError + func (e *AppError) AsInvalidInput() *AppError + func (e *AppError) AsInvalidRange() *AppError + func (e *AppError) AsLoginRequired() *AppError + func (e *AppError) AsNotFoundWithCode(code string) *AppError + func (e *AppError) AsRateLimitWithCode(code string) *AppError + func (e *AppError) AsRequiredField() *AppError + func (e *AppError) AsResourceExists() *AppError + func (e *AppError) AsResourceForbidden() *AppError + func (e *AppError) AsResourceNotFound() *AppError + func (e *AppError) AsServiceTimeout() *AppError + func (e *AppError) AsServiceUnavailable() *AppError + func (e *AppError) AsTimeout() *AppError + func (e *AppError) AsTokenExpired() *AppError + func (e *AppError) AsTokenInvalid() *AppError + func (e *AppError) AsTooManyRequests() *AppError + func (e *AppError) AsUnavailableWithCode(code string) *AppError + func (e *AppError) AsValidationError() *AppError + func (e *AppError) AsValidationWithCode(code string) *AppError + func (e *AppError) Cause() error + func (e *AppError) Error() string + func (e *AppError) GetHTTPStatus() int + func (e *AppError) GetStackTrace() string + func (e *AppError) GetStackTraceLines() []string + func (e *AppError) HasCode(code string) bool + func (e *AppError) IsType(errorType ErrorType) bool + func (e *AppError) String() string + func (e *AppError) Unwrap() error + func (e *AppError) UnwrapAll() error + func (e *AppError) WithCause(cause error) *AppError + func (e *AppError) WithCode(code string) *AppError + func (e *AppError) WithCodeAndMessage(code, message string) *AppError + func (e *AppError) WithDetails(details string) *AppError + func (e *AppError) WithHTTPStatus(status int) *AppError + func (e *AppError) WithMessage(message string) *AppError + func (e *AppError) WithType(errorType ErrorType) *AppError + type ErrorType string + const ErrorTypeAuthentication + const ErrorTypeAuthorization + const ErrorTypeConflict + const ErrorTypeExternal + const ErrorTypeInternal + const ErrorTypeNotFound + const ErrorTypeRateLimit + const ErrorTypeUnavailable + const ErrorTypeValidation + func (et ErrorType) DefaultHTTPStatus() int