Documentation ¶
Index ¶
Constants ¶
View Source
const ( ServerErrorCode = ErrorCode("server_error") BadRequestErrorCode = ErrorCode("bad_request") NotFoundErrorCode = ErrorCode("not_found") ConflictErrorCode = ErrorCode("conflict") )
Enumerated values for ErrorCode
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
Error respresents an application error
func NewBadRequestError ¶
NewBadRequestError create a new application error with status 400
func NewConflictError ¶
NewConflictError create a new application error with status 409
func NewInternalServerError ¶
NewInternalServerError create a new application error with status 500
func NewNotFoundError ¶
func NewNotFoundError() *Error
NewNotFoundError create a new application error with status 404
func NewUnauthorizedError ¶
func NewUnauthorizedError() *Error
NewUnauthorizedError create a new application error with status 401
Click to show internal directories.
Click to hide internal directories.