Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CustomHTTPErrorHandler ¶
func CustomHTTPErrorHandler(err error, c echo.Context)
func GetStackField ¶
func GetStackField(err error) errorField
Types ¶
type Error ¶
type Error struct { Status ErrorStatus Message string StackErr error DebugMessage string ErrFields []string }
func NewError ¶
func NewError(err error, errStatus ErrorStatus) *Error
func (*Error) ToEchoError ¶
func (*Error) WithDebugMessage ¶
func (*Error) WithFields ¶ added in v1.1.1
func (*Error) WithMessage ¶
type ErrorStatus ¶
type ErrorStatus string
const ( BadRequest ErrorStatus = "BAD_REQUEST" InternalError ErrorStatus = "INTERNAL_ERROR" Forbidden ErrorStatus = "FORBIDDEN" NotFound ErrorStatus = "NOT_FOUND" Conflict ErrorStatus = "CONFLICT" UnsupportedMediaType ErrorStatus = "UNSUPPORTED_MEDIA_TYPE" UnprocessableEntity ErrorStatus = "UNPROCESSABLE_ENTITY" TooManyRequests ErrorStatus = "TOO_MANY_REQUESTS" InternalServerError ErrorStatus = "INTERNAL_SERVER_ERROR" )
func (ErrorStatus) StatusCode ¶
func (e ErrorStatus) StatusCode() int
func (ErrorStatus) String ¶
func (e ErrorStatus) String() string
type RestErrorResponse ¶
type StackTracer ¶
type StackTracer interface {
StackTrace() errors.StackTrace
}
Click to show internal directories.
Click to hide internal directories.