Documentation
¶
Index ¶
- func FromDoRequestError(req *http.Request, err error) error
- func FromNewRequestError(method, url string, err error) error
- func FromResponse(resp *http.Response) error
- func IgnoreNotFound(err error) error
- func IsNotFound(err error) bool
- func IsRecoverable(err error) bool
- func IsServerError(err error) bool
- func IsUnauthorized(err error) bool
- func NewContextError(err error) error
- func NewNotFoundError() error
- func NewUnrecoverableError(message string) error
- type ContextError
- type ServerError
- type UnrecoverableError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromNewRequestError ¶
func FromResponse ¶
func IgnoreNotFound ¶
func IsNotFound ¶
func IsRecoverable ¶
func IsServerError ¶
func IsUnauthorized ¶
func NewContextError ¶
func NewNotFoundError ¶
func NewNotFoundError() error
func NewUnrecoverableError ¶
Types ¶
type ContextError ¶
type ContextError struct {
// contains filtered or unexported fields
}
func (ContextError) Is ¶
func (e ContextError) Is(err error) bool
Redirects the behavior of Is to As because Is is not implemented for k8s.io errors aggregate.
type ServerError ¶
type ServerError struct { StatusCode int `json:"status"` URL string `json:"url"` Method string `json:"method"` Message string `json:"message"` }
func NewServerError ¶
func NewServerError(resp *http.Response) ServerError
func (ServerError) Error ¶
func (err ServerError) Error() string
func (ServerError) IsRecoverable ¶
func (err ServerError) IsRecoverable() bool
type UnrecoverableError ¶
type UnrecoverableError struct {
// contains filtered or unexported fields
}
func (UnrecoverableError) Error ¶
func (err UnrecoverableError) Error() string
Click to show internal directories.
Click to hide internal directories.