Versions in this module Expand all Collapse all v0 v0.0.1 Oct 9, 2024 Changes in this version + func CodeStr(code ServiceErrorCode) *string + func Href(code ServiceErrorCode) *string + type ServiceError struct + Code ServiceErrorCode + HttpCode int + Reason string + func BadRequest(reason string, values ...interface{}) *ServiceError + func Conflict(reason string, values ...interface{}) *ServiceError + func DatabaseAdvisoryLock(err error) *ServiceError + func FailedToParseSearch(reason string, values ...interface{}) *ServiceError + func Find(code ServiceErrorCode) (bool, *ServiceError) + func Forbidden(reason string, values ...interface{}) *ServiceError + func GeneralError(reason string, values ...interface{}) *ServiceError + func MalformedRequest(reason string, values ...interface{}) *ServiceError + func New(code ServiceErrorCode, reason string, values ...interface{}) *ServiceError + func NotFound(reason string, values ...interface{}) *ServiceError + func NotImplemented(reason string, values ...interface{}) *ServiceError + func Unauthenticated(reason string, values ...interface{}) *ServiceError + func Unauthorized(reason string, values ...interface{}) *ServiceError + func Validation(reason string, values ...interface{}) *ServiceError + func (e *ServiceError) AsError() error + func (e *ServiceError) AsOpenapiError(operationID string) openapi.Error + func (e *ServiceError) Error() string + func (e *ServiceError) Is404() bool + func (e *ServiceError) IsConflict() bool + func (e *ServiceError) IsForbidden() bool + type ServiceErrorCode int + const ERROR_CODE_PREFIX + const ERROR_HREF + const ErrorBadRequest + const ErrorConflict + const ErrorDatabaseAdvisoryLock + const ErrorFailedToParseSearch + const ErrorForbidden + const ErrorGeneral + const ErrorInvalidToken + const ErrorMalformedRequest + const ErrorNotFound + const ErrorNotImplemented + const ErrorUnauthenticated + const ErrorUnauthorized + const ErrorValidation + type ServiceErrors []ServiceError + func Errors() ServiceErrors