errorsx

package
v0.0.0-...-5c6460a Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppErrorPresenter

func AppErrorPresenter(ctx context.Context, e error) *gqlerror.Error

func NewInvalidParamError

func NewInvalidParamError(err error) error

func NewNotAllowedError

func NewNotAllowedError(err error) error

func NewNotFoundError

func NewNotFoundError(err error) error

func NewResolverError

func NewResolverError(err error) error

func WarnDuplicatedErrorWrap

func WarnDuplicatedErrorWrap(err error)

Types

type AppError

type AppError interface {
	error

	// Code returns the status code of the HTTP response
	Code() int

	// Unwrap returns the underlying error if one is set
	Unwrap() error
}

AppError provides the generic API and protocol agnostic error type all SDK generated exception types will implement

type InvalidParamError

type InvalidParamError struct {
	// contains filtered or unexported fields
}

func (*InvalidParamError) Code

func (e *InvalidParamError) Code() int

func (*InvalidParamError) Error

func (e *InvalidParamError) Error() string

func (*InvalidParamError) Unwrap

func (e *InvalidParamError) Unwrap() error

type NotAllowedError

type NotAllowedError struct {
	// contains filtered or unexported fields
}

func (*NotAllowedError) Code

func (e *NotAllowedError) Code() int

func (*NotAllowedError) Error

func (e *NotAllowedError) Error() string

func (*NotAllowedError) Unwrap

func (e *NotAllowedError) Unwrap() error

type NotFoundError

type NotFoundError struct {
	// contains filtered or unexported fields
}

func (*NotFoundError) Code

func (e *NotFoundError) Code() int

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

func (*NotFoundError) Unwrap

func (e *NotFoundError) Unwrap() error

type ResolverError

type ResolverError struct {
	// contains filtered or unexported fields
}

func (*ResolverError) Code

func (e *ResolverError) Code() int

func (*ResolverError) Error

func (e *ResolverError) Error() string

func (*ResolverError) Unwrap

func (e *ResolverError) Unwrap() error

Jump to

Keyboard shortcuts

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