httperr

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BadRequest

func BadRequest(msg ...interface{}) *echo.HTTPError

BadRequest returns a new bad requets error.

func Conflict

func Conflict(args ...interface{}) *echo.HTTPError

func Forbidden

func Forbidden(msg ...interface{}) *echo.HTTPError

Forbidden returns 403 Forbidden.

func InternalError

func InternalError(msg ...interface{}) *echo.HTTPError

InternalError returns a new internal server error.

func InvalidField

func InvalidField(name string) *echo.HTTPError

InvalidField is a helper method for returning 400 Bad Request for an invalid body payload field value.

func InvalidParameter

func InvalidParameter(name string, value ...string) *echo.HTTPError

InvalidParameter is a helper method for returning 400 Bad Request for an invalid parameter value.

func MissingField

func MissingField(name string) *echo.HTTPError

MissingField is a helper method for returning 400 Bad Request for a missing body field.

func MissingParameter

func MissingParameter(name string) *echo.HTTPError

MissingParameter is a helper method for returning 400 Bad Request for a missing parameter.

func NotFound

func NotFound(resourceType, resourceName string) *echo.HTTPError

NotFound returns a new not found error. If err is nil than ErrNotFound will be used.

func PreconditionFailed

func PreconditionFailed(msg ...interface{}) *echo.HTTPError

func RequestToLarge

func RequestToLarge(msg ...interface{}) *echo.HTTPError

func Unauthorized

func Unauthorized(msg ...interface{}) *echo.HTTPError

func UnsupportedMediaType

func UnsupportedMediaType(msg ...interface{}) *echo.HTTPError

Types

This section is empty.

Jump to

Keyboard shortcuts

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