clienterror

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 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

IsEntityValidationFailed checks if the entity validation failed.

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 `json:"operation,omitempty"`
	Code      int    `json:"code,omitempty"`
	Message   string `json:"message,omitempty"`
	// 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

Error returns the error string

Jump to

Keyboard shortcuts

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