Documentation
¶
Index ¶
- Constants
- type Error
- func New(httpStatusCode int, errorCode int, errorMessage string, err error) Error
- func NewBusinessError(errorCode int, errorMessage string, err error) Error
- func NewForbiddenError(errorMsg string) Error
- func NewInternalServiceError(err error) Error
- func NewRangeUnacceptableError(errorMsg string) Error
- func NewUnauthorizedError(errorMsg string) Error
Constants ¶
View Source
const ( ErrCodeInvalidRange = 800 ErrCodeInternal = 900 ErrCodeForbidden = 701 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct {
ErrorCode int
ErrorMessage string
Details map[string]any
// contains filtered or unexported fields
}
func NewForbiddenError ¶
func NewInternalServiceError ¶
func NewUnauthorizedError ¶
func (Error) HttpStatusCode ¶ added in v1.8.2
func (Error) WriteError ¶
func (e Error) WriteError(w http.ResponseWriter) error
Click to show internal directories.
Click to hide internal directories.