errdefs

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAlreadyExists

func IsAlreadyExists(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 IsNotImplemented

func IsNotImplemented(err error) bool

func IsResourcesExhausted

func IsResourcesExhausted(err error) bool

func IsUnknown

func IsUnknown(err error) bool

func NewAlreadyExists

func NewAlreadyExists(msg string) error

func NewDeadlineExceeded

func NewDeadlineExceeded(msg string) error

func NewFailedPrecondition

func NewFailedPrecondition(msg string) error

func NewInvalidArgument

func NewInvalidArgument(msg string, details ...*ErrorDetail) error

func NewNotFound

func NewNotFound(msg string) error

func NewNotImplemented

func NewNotImplemented(msg string) error

func NewResourcesExhausted

func NewResourcesExhausted(msg string) error

func NewUnknown

func NewUnknown(msg string) error

func OverrideHumaErrorBuilder

func OverrideHumaErrorBuilder()

Types

type Code

type Code string

type ErrorDetail

type ErrorDetail = huma.ErrorDetail

type RavelError

type RavelError struct {
	RavelCode Code           `json:"code"`
	Status    int            `json:"status"`
	Title     string         `json:"title"`
	Detail    string         `json:"detail"`
	Errors    []*ErrorDetail `json:"errors,omitempty"`
	// contains filtered or unexported fields
}

func FromHTTPResponse

func FromHTTPResponse(resp *http.Response) *RavelError

func (*RavelError) Code

func (r *RavelError) Code() Code

func (*RavelError) Error

func (r *RavelError) Error() string

func (*RavelError) GetStatus

func (r *RavelError) GetStatus() int

Jump to

Keyboard shortcuts

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