rest_errors

package
v0.0.0-...-8ae5609 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInternalServer   = errors.New("internal server error")
	ErrBadRequest       = errors.New("bad request")
	ErrUserUnauthorized = errors.New("user unauthorized")
)

Functions

func HandleError

func HandleError(w http.ResponseWriter, err error, status int)

Types

type ResponseError

type ResponseError struct {
	Error string `json:"error"`
}

func (*ResponseError) String

func (re *ResponseError) String() string

Jump to

Keyboard shortcuts

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