errordef

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 7 Imported by: 26

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrServer        = xerror.Enrich(unique.New("server_error"), "an unexpected error occurred")
	ErrServerTimeout = xerror.Enrich(unique.New("server_timeout"), "server timeout")

	ErrRequestInvalid  = unique.New("invalid_request")
	ErrRequestTooLarge = unique.New("too_large_request")
	ErrDuplicated      = unique.New("duplicated")
	ErrNotFound        = unique.New("not_found")

	ErrCredentialsInvalid = unique.New("invalid_credentials")

	ErrUnauthenticated = unique.New("unauthenticated")
	ErrForbidden       = unique.New("forbidden")

	ErrClientInvalidType = unique.New("invalid_client_type")

	// File error
	ErrFileMismatchedSize = unique.New("mismatched_file_size")
	ErrFileMismatchedType = unique.New("mismatched_file_type")
	ErrFileInvalidContent = unique.New("invalid_file_content")

	// OAuth2 flow error
	ErrOAuth2ClientInvalid = unique.New("invalid_client")
	ErrOAuth2ScopeInvalid  = unique.New("invalid_scope")
	ErrOAuth2AccessDenied  = unique.New("access_denied")
	ErrOAuth2InvalidGrant  = unique.New("invalid_grant")
)

For handling domain error

View Source
var ErrDomainKnown = errors.New("")

For Domain Usage

Functions

func ConvertGRPCError added in v0.3.0

func ConvertGRPCError(err error) error

func ConvertGormError added in v0.3.0

func ConvertGormError(err error) error

func ConvertRedisError added in v0.3.0

func ConvertRedisError(err error) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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