errors

package
v0.0.0-...-f244974 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ResourceExhaustedTrait expresses that the requested resource is exhausted.
	ResourceExhaustedTrait = errorx.RegisterTrait("resource_exhausted")
	// ResourceExhausted expresses that the requested resource is exhausted.
	ResourceExhausted = errorx.NewType(namespace, "ResourceExhausted", ResourceExhaustedTrait)

	// InternalTrait expresses internal failure.
	InternalTrait = errorx.RegisterTrait("internal")
	// Internal expresses internal failure.
	Internal = errorx.NewType(namespace, "Internal", InternalTrait)

	// NotFoundTrait expresses that the requested resource is not available.
	NotFoundTrait = errorx.RegisterTrait("not_found")
	// NotFoundTrait expresses that the requested resource is not available.
	NotFound = errorx.NewType(namespace, "NotFound", NotFoundTrait)

	// InvalidArgumentTrait expresses the given request is invalid.
	InvalidArgumentTrait = errorx.RegisterTrait("invalid_argument")
	// InvalidArgument expresses the given request is invalid.
	InvalidArgument = errorx.NewType(namespace, "InvalidArgument", InvalidArgumentTrait)

	// FailedPreconditionTrait expresses that a certain pre condition is not met and therefore the operation failed.
	FailedPreconditionTrait = errorx.RegisterTrait("failed_precondition")
	// FailedPrecondition expresses that a certain pre condition is not met and therefore the operation failed.
	FailedPrecondition = errorx.NewType(namespace, "FailedPrecondition", FailedPreconditionTrait)
)

Functions

func ToGrpcError

func ToGrpcError(err error) error

ToGrpcError transforms the given error into a gRPC error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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