errors

package
v0.0.0-...-3778cc8 Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrParseRequest = ExternalError{
		Code:    1,
		Message: "unable to parse request",
	}

	ErrValidateRequest = ExternalError{
		Code:    2,
		Message: "unable to validate request",
	}
)

Functions

This section is empty.

Types

type ExternalError

type ExternalError struct {
	Code    int    `example:"1"`
	Message string `example:"Unable to parse request"`
	Err     string `example:"Extended description of error" json:"details,omitempty"`
}

func New

func New(code int, message string) *ExternalError

func NewFromBase

func NewFromBase(base ExternalError, details error) *ExternalError

func (*ExternalError) Error

func (e *ExternalError) Error() string

Jump to

Keyboard shortcuts

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