custom_error

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeDefault = "-1"
	// バリデーションエラー
	CodeValidation = "000001"
	// 無効な認証
	CodeInvalidAuthorization = "000002"
	// Not Found
	CodeNotFound = "000003"
	// Already Exists
	CodeAlreadyExists = "000004"
	// 自身の招待コード
	CodeMyInviteCode = "000005"
	// ユーザー削除時に共有メンバーが存在する
	HasRelationshipByDeleteUser = "000006"
)

Variables

This section is empty.

Functions

func CustomError

func CustomError(err error) error

func CustomErrorWrap

func CustomErrorWrap(err error, message string) error

func GetCustomStackTrace

func GetCustomStackTrace(err error) errors.StackTrace

func NewAlreadyExists

func NewAlreadyExists(message string) error

func NewInvalidAuthError

func NewInvalidAuthError(message string) error

func NewNotFoundError

func NewNotFoundError(message string) error

func NewRequestError

func NewRequestError(code string, message string) error

func NewValidationError

func NewValidationError(message string) error

Types

type RequestError

type RequestError struct {
	Code    string
	Message string
}

func (RequestError) Error

func (re RequestError) Error() string

Jump to

Keyboard shortcuts

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