error

package
v0.0.0-...-f4dd3ec Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2025 License: Apache-2.0 Imports: 8 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureInternal

func EnsureInternal(err error) error

Types

type Error

type Error struct {
	Code       codes.Code
	StackTrace string
	IncidentID string
	// contains filtered or unexported fields
}

func AlreadyExists

func AlreadyExists(subject, key string, value any) *Error

func BadRequest

func BadRequest(err error) *Error

func BadRequestHidden

func BadRequestHidden(err error, message string) *Error

func Forbidden

func Forbidden(message string) *Error

func Internal

func Internal(err error) *Error

func InternalWithoutStackTrace

func InternalWithoutStackTrace(err error) *Error

func NotFound

func NotFound(subject, key string, value any) *Error

func Unauthorized

func Unauthorized(message string) *Error

func UnauthorizedHidden

func UnauthorizedHidden(err error, message string) *Error

func ValidationError

func ValidationError(err error) *Error

func VersionMismatch

func VersionMismatch(subject, key string, value any, version int) *Error

func WrapInternal

func WrapInternal(err error) *Error

func (*Error) Error

func (e *Error) Error() string

func (*Error) GRPCStatus

func (e *Error) GRPCStatus() *status.Status

func (*Error) GetCode

func (e *Error) GetCode() codes.Code

func (*Error) SafeError

func (e *Error) SafeError() string

func (*Error) ToGRPCError

func (e *Error) ToGRPCError() error

func (*Error) Unwrap

func (e *Error) Unwrap() error

type GrpcStatus

type GrpcStatus interface {
	GRPCStatus() *status.Status
}

Jump to

Keyboard shortcuts

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