errorutil

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Conflict

func Conflict(format string, args ...any) error

Conflict creates a new conflict error with a given error message.

func ConnectErrorComparer

func ConnectErrorComparer() cmp.Option

func Convert

func Convert(err error) *connect.Error

Convert compares the error and maps it to a appropriate connect.Error if there is no backend-specific wrapped error given to this function, it will just return an internal error. if there are multiple errors wrapped this function only cares about the first found error in the error tree.

func FailedPrecondition

func FailedPrecondition(format string, args ...any) error

FailedPrecondition creates a new FailedPrecondition error with a given error message and the original error.

func Internal

func Internal(format string, args ...any) error

Internal creates a new Internal error with a given error message and the original error.

func InvalidArgument

func InvalidArgument(format string, args ...any) error

InvalidArgument creates a new InvalidArgument error with a given error message and the original error.

func IsConflict

func IsConflict(err error) bool

func IsFailedPrecondition

func IsFailedPrecondition(err error) bool

func IsInternal

func IsInternal(err error) bool

func IsInvalidArgument

func IsInvalidArgument(err error) bool

func IsNotFound

func IsNotFound(err error) bool

func NotFound

func NotFound(format string, args ...any) error

NotFound creates a new notfound error with a given error message.

Types

This section is empty.

Jump to

Keyboard shortcuts

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