exception

package
v0.0.0-...-b78b7ea Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: MIT Imports: 7 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BadRequest

func BadRequest(w http.ResponseWriter)

func BadRequestError

func BadRequestError(w http.ResponseWriter, e error)

func BadRequestFields

func BadRequestFields(w http.ResponseWriter, fields map[string]string)

func BadRequestMessage

func BadRequestMessage(w http.ResponseWriter, msg string)

func Forbidden

func Forbidden(w http.ResponseWriter)

func InternalServerError

func InternalServerError(w http.ResponseWriter, e error)

func MethodNotAllowed

func MethodNotAllowed(w http.ResponseWriter)

func NoContent

func NoContent(w http.ResponseWriter)

func NotFound

func NotFound(w http.ResponseWriter)

func PgxNoRows

func PgxNoRows(w http.ResponseWriter, err error)

func Unauthorized

func Unauthorized(w http.ResponseWriter)

func UnauthorizedError

func UnauthorizedError(w http.ResponseWriter, e error)

func WsError

func WsError(conn *websocket.Conn, err error)

Types

type Error

type Error struct {
	StatusCode int    `json:"statusCode"`
	Message    string `json:"message"`
}

type ErrorWithFields

type ErrorWithFields struct {
	StatusCode int               `json:"statusCode"`
	Message    string            `json:"message"`
	Fields     map[string]string `json:"fields"`
}

Jump to

Keyboard shortcuts

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