apperror

package
v0.0.0-...-04f3e75 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorHandler

func ErrorHandler(e *echo.Echo) echo.HTTPErrorHandler

Types

type Error

type Error struct {
	Message       string            `json:"message"`
	Where         string            `json:"location,omitempty"`
	DetailedError string            `json:"detailed_error,omitempty"`
	StatusCode    int               `json:"status_code"`
	Validation    []ValidationError `json:"validation,omitempty"`
}

func NewAppError

func NewAppError(message string, err error) *Error

func NewAuthnError

func NewAuthnError(message string, err error) *Error

func NewAuthzError

func NewAuthzError(message string, err error) *Error

func NewValidationError

func NewValidationError(message string, err error) *Error

func (*Error) Error

func (e *Error) Error() string

type ValidationError

type ValidationError struct {
	Field   string `json:"field"`
	Message string `json:"message"`
}

Jump to

Keyboard shortcuts

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