msg

package
v0.0.0-...-13aabeb Latest Latest
Warning

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

Go to latest
Published: Nov 11, 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", "no user found in the context")
)

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