reporting

package
v0.0.0-...-ef1d3fc Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCaptcha = &gqlerror.Error{
	Message:    "The captcha challenge has not been met.",
	Extensions: map[string]any{"code": "CAPTCHA"},
}
View Source
var ErrConstraint = &gqlerror.Error{
	Message:    "Input violates data constraints.",
	Extensions: map[string]any{"code": "CONSTRAINT"},
}
View Source
var ErrInput = &gqlerror.Error{
	Message:    "The input data is not in a valid format.",
	Extensions: map[string]any{"code": "INPUT"},
}
View Source
var ErrInternal = &gqlerror.Error{
	Message:    "Internal system error.",
	Extensions: map[string]any{"code": "INTERNAL"},
}
View Source
var ErrNotFound = &gqlerror.Error{
	Message:    "The specified resource does not exist.",
	Extensions: map[string]any{"code": "NOT_FOUND"},
}
View Source
var ErrRateLimit = &gqlerror.Error{
	Message:    "A limit of attempts per unit of time has been reached for this action.",
	Extensions: map[string]any{"code": "RATE_LIMIT"},
}
View Source
var ErrUnauthenticated = &gqlerror.Error{
	Message:    "This action requires authentication.",
	Extensions: map[string]any{"code": "UNAUTHENTICATED"},
}
View Source
var ErrUnauthorized = ErrNotFound // not to expose whether a resource exists
View Source
var ErrValidation = &gqlerror.Error{
	Message:    "Input does not meet data validation rules.",
	Extensions: map[string]any{"code": "VALIDATION"},
}
View Source
var ErrWrongPassword = &gqlerror.Error{
	Message:    "This action requires providing the right password.",
	Extensions: map[string]any{"code": "WRONG_PASSWORD"},
}

Functions

func NewErrorPresenter

func NewErrorPresenter(cfg *config.Config) graphql.ErrorPresenterFunc

func PanicHandler

func PanicHandler(ctx context.Context, err any) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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