errors

package
v0.0.0-...-8e53d61 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsHubbleErr

func IsHubbleErr(err error) bool

Types

type ErrDef

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

func NewError

func NewError(err error, ae *proto.ActionableErr) *ErrDef

NewError creates an actionable error message preserving the actual error.

func NewErrorWithStatusCode

func NewErrorWithStatusCode(ae *proto.ActionableErr) *ErrDef

NewErrorWithStatusCode creates an actionable error message.

func (*ErrDef) Error

func (e *ErrDef) Error() string

func (*ErrDef) StatusCode

func (e *ErrDef) StatusCode() proto.StatusCode

func (*ErrDef) Suggestions

func (e *ErrDef) Suggestions() []*proto.Suggestion

func (*ErrDef) Unwrap

func (e *ErrDef) Unwrap() error

type Error

type Error interface {
	Error() string
	StatusCode() proto.StatusCode
	Suggestions() []*proto.Suggestion
	Unwrap() error
}

Jump to

Keyboard shortcuts

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