errors

package
v0.0.0-...-dd2b8c9 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2020 License: MIT Imports: 2 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewError

func NewError(msg string) error

NewError - return a basic New error given a message string

Types

type RestErr

type RestErr struct {
	Message string
	Status  int
	Error   string
}

RestErr - A struct representing a REST error message

func NewBadRequestError

func NewBadRequestError(message string) *RestErr

NewBadRequestError - return a 400 bad request error given a message string

func NewDbError

func NewDbError(message string, errMsg string) *RestErr

NewDbError - return a custom 400 bad request error given a message string and error message

func NewInternalServerError

func NewInternalServerError(message string) *RestErr

NewInternalServerError - return a 500 internal server error given a message string

func NewNotFoundError

func NewNotFoundError(message string) *RestErr

NewNotFoundError - return a 404 not found error given a message string

Jump to

Keyboard shortcuts

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