apiError

package
v1.0.15 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2025 License: MIT Imports: 3 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasErrorCode added in v1.0.3

func HasErrorCode(err error, code errorCode.ErrorCode) bool

func HasHTTPCode added in v1.0.3

func HasHTTPCode(err error, code int) bool

Types

type Error

type Error struct {
	HttpStatusCode int         `json:"-"`
	ErrorCode      string      `json:"code"`
	Message        string      `json:"message"`
	Meta           interface{} `json:"meta,omitempty"`
}

func (Error) Error

func (e Error) Error() string

func (Error) GetErrorCode

func (e Error) GetErrorCode() string

func (Error) GetHttpStatusCode

func (e Error) GetHttpStatusCode() int

func (Error) GetMessage

func (e Error) GetMessage() string

func (Error) GetMeta

func (e Error) GetMeta() interface{}

func (Error) Is

func (e Error) Is(target error) bool

Jump to

Keyboard shortcuts

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