errors

package
v0.0.0-...-a7e6680 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteError

func WriteError(w http.ResponseWriter, err error, defaultStatusCode ...int)

Types

type ControllerError

type ControllerError struct {
	ErrorMessage string
	Fields       []types.ErrorField
	StatusCode   int
	Err          error
}

func NewError

func NewError(errorMessage string, fields []types.ErrorField, statusCode int) *ControllerError

func Wrap

func Wrap(errorMessage string, statusCode int, err error) *ControllerError

func (*ControllerError) Error

func (e *ControllerError) Error() string

Jump to

Keyboard shortcuts

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