errorx

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2025 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type ApiError

type ApiError struct {
	// contains filtered or unexported fields
}

func BadRequestErr

func BadRequestErr(err error) *ApiError

func InternalServerErr

func InternalServerErr(err error) *ApiError

func NewApiError

func NewApiError(err error, code int) *ApiError

func UnauthorizedErr

func UnauthorizedErr(err error) *ApiError

func (*ApiError) Error

func (e *ApiError) Error() string

type ErrorResponse

type ErrorResponse struct {
	Error string `json:"error"`
	Code  int    `json:"code"`
}

type ErrorReturningHandler

type ErrorReturningHandler func(w http.ResponseWriter, r *http.Request) *ApiError

Jump to

Keyboard shortcuts

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