errors

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiError

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

func New

func New(internalCode int, statusCode int, message string) ApiError

func (ApiError) Error

func (e ApiError) Error() string

Error returns the error message

Do NOT use this for returning error messages to the user, because it returns the wrapped errors as well! Use the Message field instead.

func (ApiError) InternalCode

func (e ApiError) InternalCode() int

func (ApiError) Is

func (e ApiError) Is(target error) bool

func (ApiError) Message

func (e ApiError) Message() string

func (ApiError) New

func (e ApiError) New(internalCode int, message string) ApiError

func (ApiError) StatusCode

func (e ApiError) StatusCode() int

func (ApiError) Unwrap

func (e ApiError) Unwrap() error

Jump to

Keyboard shortcuts

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