error

package
v0.0.0-...-3a75ae7 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatError

func FormatError(err error) string

TODO: move it to some other module.

Types

type HttpError

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

HttpError is an error that cares additional information about the HTTP status for the error.

func FromError

func FromError(err error, code int, message ...string) HttpError

FromError creates a new HttpError with the given error and code.

func New

func New(message string, code int, errors ...error) HttpError

New creates a new HttpError with the given message and code.

func (HttpError) Error

func (e HttpError) Error() string

func (HttpError) StatusCode

func (e HttpError) StatusCode() int

func (HttpError) Unwrap

func (e HttpError) Unwrap() []error

Jump to

Keyboard shortcuts

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