apperror

package
v0.0.0-...-63fb21e Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrForbidden = AppError{

	StatusCode: http.StatusForbidden,
	// contains filtered or unexported fields
}
View Source
var ErrMalformedRequest = AppError{

	StatusCode: http.StatusUnprocessableEntity,
	// contains filtered or unexported fields
}
View Source
var ErrMissing = AppError{

	StatusCode: http.StatusNotFound,
	// contains filtered or unexported fields
}
View Source
var ErrMissingContext = AppError{

	StatusCode: http.StatusInternalServerError,
	// contains filtered or unexported fields
}
View Source
var ErrMissingJSAdapter = AppError{

	StatusCode: http.StatusInternalServerError,
	// contains filtered or unexported fields
}

Functions

This section is empty.

Types

type AppError

type AppError struct {
	StatusCode int
	// contains filtered or unexported fields
}

func ErrNewMissingContext

func ErrNewMissingContext(keyName string) *AppError

func New

func New(err error, status int) AppError

func NewGeneric

func NewGeneric(err error) AppError

func NewStringGeneric

func NewStringGeneric(errMsg string) AppError

func (AppError) Error

func (e AppError) Error() string

func (AppError) Errors

func (e AppError) Errors() []string

func (AppError) HTTPStatus

func (e AppError) HTTPStatus() int

Jump to

Keyboard shortcuts

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