errors

package
v0.0.0-...-1c20ad9 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ValidationErrorMessage string = "validation error: incorrect params"
	NotFoundMessage        string = "not found"
	InternalErrorMessage   string = "internal error"
)

Variables

This section is empty.

Functions

func WrapSqlError

func WrapSqlError(err error) error

Types

type ErrorResult

type ErrorResult struct {
	Err        error
	Msg        string
	StatusCode int
}

func FromError

func FromError(err error) (*ErrorResult, bool)

func WrapError

func WrapError(err error, msg string, status int) *ErrorResult

func WrapForbiddenError

func WrapForbiddenError(err error, msg string) *ErrorResult

func WrapInternalError

func WrapInternalError(err error) *ErrorResult

func WrapNotFoundError

func WrapNotFoundError(err error, msg string) *ErrorResult

func WrapValidationError

func WrapValidationError(err error) *ErrorResult

func (*ErrorResult) Error

func (e *ErrorResult) Error() string

Jump to

Keyboard shortcuts

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