errors

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Code

func Code(err error) codes.Code

Code - returns a nitric api error code from an error or Unknown if the error was not a nitric api error

func FromGrpcError

func FromGrpcError(err error) error

FromGrpcError - translates a standard grpc error to a nitric api error

func New

func New(c codes.Code, msg string) error

New - Creates a new nitric API error

func NewWithCause

func NewWithCause(c codes.Code, msg string, cause error) error

NewWithCause - Creates a new nitric API error with the given error as it's cause

Types

type ApiError

type ApiError struct {
	// contains filtered or unexported fields
}

func (*ApiError) Error

func (a *ApiError) Error() string

func (*ApiError) Unwrap

func (a *ApiError) Unwrap() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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