error_handler

package
v0.9.22 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNilErrorHandler = errors.New("nil error handler")
)

Functions

This section is empty.

Types

type ErrorHandler

type ErrorHandler interface {
	HandleError(next http.Handler) http.Handler
}

ErrorHandler interface for handling the errors

type Middleware

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

Middleware struct is the error handler middleware

func NewMiddleware

func NewMiddleware(handler gonethttphandler.Handler) (*Middleware, error)

NewMiddleware creates a new error handler middleware

func (*Middleware) HandleError

func (m *Middleware) HandleError(next http.Handler) http.Handler

HandleError handles the error

Jump to

Keyboard shortcuts

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