apierror

package
v0.0.0-...-d781a51 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetErrorPresenter

func GetErrorPresenter(log logrus.FieldLogger) graphql.ErrorPresenterFunc

GetErrorPresenter returns a GraphQL error presenter that filters out error messages not intended for end users. All filtered errors are logged.

Types

type Error

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

Error is an error that can be presented to end-users

func Errorf

func Errorf(format string, args ...any) Error

Errorf formats an error message for end-users. Remember not to leak sensitive information in error messages.

func (Error) Error

func (e Error) Error() string

Error returns the formatted message for end-users

func (Error) GraphError

func (e Error) GraphError() string

Jump to

Keyboard shortcuts

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