msg

package
v0.0.0-...-23b5947 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidEmailOrPassword = errors.New("invalid email or password")
	ErrUnauthorized           = ErrWithCode("UNAUTHORIZED", "not allowed to perform this action")
	ErrInvalidInput           = ErrWithCode("INVALID_INPUT", "invalid input")
	ErrNotFound               = ErrWithCode("NOT_FOUND", "not found")
	ErrUserExists             = ErrWithCode("USER_EXISTS", "user already exists")
)

Functions

func ErrPresenter

func ErrPresenter(ctx context.Context, err error) *gqlerror.Error

ErrPresenter puts the code into the extensions field of the error, if it is an ErrorWithCode

Types

type ErrorWithCode

type ErrorWithCode struct {
	Code string
	// contains filtered or unexported fields
}

func ErrWithCode

func ErrWithCode(code string, message string) ErrorWithCode

Jump to

Keyboard shortcuts

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