middleware

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License: Apache-2.0, MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CustomHTTPErrorHandler added in v0.0.17

func CustomHTTPErrorHandler(err error, c echo.Context)

CustomHTTPErrorHandler is a centralized error handler for all Echo routes Set this as Echo's HTTPErrorHandler to automatically handle all errors

func HandleError

func HandleError(err error, c echo.Context)

HandleError converts any error to an HTTP response It's especially helpful for handling our custom ContextualError

func RequestLogger

func RequestLogger(logger *logging.ZapEventLogger) echo.MiddlewareFunc

Types

type ErrorResponse added in v0.0.18

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

ErrorResponse represents a structured error response

Jump to

Keyboard shortcuts

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