present

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Source reflects the 'source' of an error.
	Source = "source"

	// Reason reflects the 'reason' for an error.
	Reason = "reason"

	// Code is the error code, if any.
	Code = "code"
)

Error extension fields.

Variables

This section is empty.

Functions

func Error

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

Error 'presents' errors encountered by GraphQL resolvers.

func Extend added in v0.1.2

func Extend(ctx context.Context, err error, ext map[string]interface{}) *gqlerror.Error

Extend an error with GraphQL extensions.

Types

type ErrorSource added in v0.1.2

type ErrorSource string

An ErrorSource indicates where an error originated.

const (
	ErrorSourceUnknown   ErrorSource = "Unknown"
	ErrorSourceAPIServer ErrorSource = "APIServer"
)

Error sources.

Jump to

Keyboard shortcuts

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