apperrors

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandlerWEcho

func HandlerWEcho(err error, ctx echo.Context)

func IsNotFoundError

func IsNotFoundError(err error) bool

Types

type BasicError

type BasicError struct {
	Code  int         `json:"code"`
	Error interface{} `json:"error"`
}

type HandleableError

type HandleableError interface {
	error
	StatusCode() int
}

type MessagedError

type MessagedError struct {
	Message string `json:"error"`
	Code    int    `json:"code"`
}

func NewMessagedError

func NewMessagedError(message string, code int) *MessagedError

func (MessagedError) Error

func (c MessagedError) Error() string

func (MessagedError) StatusCode

func (c MessagedError) StatusCode() int

type ValidationError

type ValidationError struct {
	validate.Errors `json:"errors"`
	Code            int `json:"code"`
}

Jump to

Keyboard shortcuts

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