exception

package
v0.0.0-...-f10e182 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AccessRestricted = Forbidden("access restricted")
	EmptyBody        = BadRequest("empty body")
)

Functions

This section is empty.

Types

type Error

type Error interface {
	Code() int
	Message() string
}

type StatusError

type StatusError struct {
	Message string
	Code    int
}

func BadRequest

func BadRequest(message string) *StatusError

func Forbidden

func Forbidden(message string) *StatusError

func InternalServiceError

func InternalServiceError(message string) *StatusError

func NotFound

func NotFound(message string) *StatusError

func Unauthorized

func Unauthorized(message string) *StatusError

func (*StatusError) Error

func (se *StatusError) Error() string

func (*StatusError) StatusCode

func (se *StatusError) StatusCode() int

Jump to

Keyboard shortcuts

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