apperrors

package
v0.0.0-...-01b0f7b Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExtensionFieldNameKey = "field"
	ExtensionErrorStatus  = "status"
)

Variables

View Source
var ErrorMessagesMap map[string]string

Functions

func AppendAppErrorToGraphqlContext

func AppendAppErrorToGraphqlContext(ctx context.Context, err *appError)

func GetAppErrorObject

func GetAppErrorObject(err error) *appError

func NewErrorWithFieldAndStatus

func NewErrorWithFieldAndStatus(key string, field string, status int) *appError

func NewErrorWithUnderlyingAndStatus

func NewErrorWithUnderlyingAndStatus(key string, err error, status int) *appError

func NewInternalErrorWithUnderlying

func NewInternalErrorWithUnderlying(key string, err error) *appError

func TranslateAppErrorsToGraphqlResponse

func TranslateAppErrorsToGraphqlResponse(ctx context.Context, err error, fieldsMap map[string]string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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