clienterror

package
v1.0.0-pre.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsEntityValidationFailed

func IsEntityValidationFailed(err error) bool

func IsNotFound

func IsNotFound(err error) bool

IsNotFound A simple helper to get a status code for an error and see if it's a not found status code

func StatusCode

func StatusCode(err error) int

StatusCode returns the HTTP status code of an error, if there is one.

func Wrap

func Wrap(err error) error

Wrap presents errors from the Swagger-generated client in a more user-friendly format. This returns a wrapped Error when possible.

Types

type Error

type Error struct {
	Operation string
	Code      int
	Message   string
	// contains filtered or unexported fields
}

Error contains the structured error data from a server to the API client.

func (*Error) Cause

func (e *Error) Cause() error

Cause is the error returned by the Swagger client.

func (*Error) Error

func (e *Error) Error() string

Jump to

Keyboard shortcuts

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