Versions in this module Expand all Collapse all v0 v0.4.2 May 22, 2024 v0.4.1 Jan 24, 2023 Changes in this version + func HasInternalCode(err error, code int) bool + func HasPublicCode(err error, code int) bool + func Is(err error, code ErrorCode) bool + func IsAbortedError(err error) bool + func IsAlreadyExistsError(err error) bool + func IsCancelledError(err error) bool + func IsDeadlineExceededError(err error) bool + func IsFailedPreconditionError(err error) bool + func IsInternalError(err error) bool + func IsInvalidArgumentError(err error) bool + func IsNotFoundError(err error) bool + func IsOutOfRangeError(err error) bool + func IsPermissionDeniedError(err error) bool + func IsUnauthenticatedError(err error) bool + func IsUnavailableError(err error) bool + func IsUnimplementedError(err error) bool + func IsUnknownError(err error) bool + func UnstackErrors(e error) []error + type Error struct + Code ErrorCode + Inner error + InternalCode int + InternalMessage string + KeyVals map[string]interface{} + Origin string + PublicCode int + PublicMessage string + StackTrace []byte + func New(inner error, origin string, code ErrorCode) Error + func (e Error) Error() string + func (e Error) ToMap() map[string]interface{} + func (e Error) With(key string, value interface{}) Error + func (e Error) WithCode(code ErrorCode) Error + func (e Error) WithInner(inner error) Error + func (e Error) WithInternalCode(code int) Error + func (e Error) WithInternalMessage(message string) Error + func (e Error) WithOrigin(origin string) Error + func (e Error) WithPublicCode(code int) Error + func (e Error) WithPublicMessage(message string) Error + type ErrorCode int + const Aborted + const AlreadyExists + const Cancelled + const DeadlineExceeded + const FailedPrecondition + const Internal + const InvalidArgument + const NotFound + const OutOfRange + const PermissionDenied + const Unauthenticated + const Unavailable + const Unimplemented + const Unknown + func (e ErrorCode) String() string