customerror

package
v0.0.0-...-953ae9e Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUserprofileAlreadyExists user already exists
	ErrUserprofileAlreadyExists = errors.New("User profile already exists")
	// ErrUserAccountDoesNotExist user account does not exist
	ErrUserAccountDoesNotExist = errors.New("User account does not exist. Please create a user account first")
	// ErrSubscriptionAlreadyExists subscription already exists
	ErrSubscriptionAlreadyExists = errors.New("Subscription already exists")
)

Functions

func DecodeJSONBody

func DecodeJSONBody(w http.ResponseWriter, r *http.Request, dst interface{}) error

DecodeJSONBody decodes a request body in json form and returns a malformed request error type if any errors do occur

Types

type MalformedRequest

type MalformedRequest struct {
	Status int
	Msg    string
}

MalformedRequest is a custom error type

func (*MalformedRequest) Error

func (mr *MalformedRequest) Error() string

Jump to

Keyboard shortcuts

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