uerror

package
v0.0.0-...-feeaf7e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsRecordNotFoundErr

func IsRecordNotFoundErr(err error) bool

func JSONHttpErrorHandler

func JSONHttpErrorHandler(e *echo.Echo) func(err error, c echo.Context)

func TextHttpErrorHandler

func TextHttpErrorHandler(e *echo.Echo) func(err error, c echo.Context)

Types

type UError

type UError struct {
	HttpCode int

	Code string

	Message string
}

func NewUError

func NewUError(httpCode int, code string, message string) *UError

func (*UError) Error

func (e *UError) Error() string

func (*UError) Is

func (e *UError) Is(err error) bool

func (*UError) WithMessage

func (e *UError) WithMessage(msg string) error

func (*UError) WithMessagef

func (e *UError) WithMessagef(format string, args ...any) error

func (*UError) WithStack

func (e *UError) WithStack() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL