apierrors

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrCodeInternal = 900
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	ErrorCode    int
	ErrorMessage string
	Details      map[string]any
	// contains filtered or unexported fields
}

func New

func New(
	internal bool,
	errorCode int,
	errorMessage string,
	err error,
) Error

func NewBusinessError

func NewBusinessError(errorCode int, errorMessage string, err error) Error

func NewInternalServiceError

func NewInternalServiceError(err error) Error

func (Error) BotResponse

func (e Error) BotResponse(chatId int64) telegram_bot.Chattable

func (Error) Error

func (e Error) Error() string

func (Error) LogLevel

func (e Error) LogLevel() log.Level

func (Error) WithDetails

func (e Error) WithDetails(details map[string]any) Error

func (Error) WithLogLevel

func (e Error) WithLogLevel(level log.Level) Error

Jump to

Keyboard shortcuts

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