utils

package
v0.2.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2025 License: Apache-2.0 Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandlerError

func NewHandlerError(statusCode int, err error) error

Types

type HandlerError

type HandlerError struct {
	Err        error
	StatusCode int
}

HandlerError is an error that can be returned by a handler to specify a status code and an error message. It is used as a wrapper around the original error to bubble up the status code to the HTTP response.

func (*HandlerError) Error

func (h *HandlerError) Error() string

Jump to

Keyboard shortcuts

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