Documentation
¶
Index ¶
- Variables
- func AsAPIError(err error) error
- func AsStatusCode(err error) int
- func AsStatusError(response *resty.Response, grs ...schema.GroupResource) error
- func ConvertKnativeFieldErrorToErrorList(err *apis.FieldError) field.ErrorList
- func ConvertKnativeFieldErrorToInternalError(err *apis.FieldError) *field.Error
- func HandleError(req *restful.Request, resp *restful.Response, err error)
- func IsTemporaryError(err error) bool
- type TemporaryError
Constants ¶
This section is empty.
Variables ¶
View Source
var RESTClientGroupResource = schema.GroupResource{Group: "katanomi.dev", Resource: "RESTfulClient"}
RESTClientGroupResource fake GroupResource to use errors api
Functions ¶
func AsAPIError ¶
AsAPIError returns an error as a apimachinary api error
func AsStatusCode ¶
AsStatusCode returns the code from a errors.APIStatus, if not compatible will return InternalServerError
func AsStatusError ¶
func AsStatusError(response *resty.Response, grs ...schema.GroupResource) error
AsStatusError transform resty response to status error
func ConvertKnativeFieldErrorToErrorList ¶
func ConvertKnativeFieldErrorToErrorList(err *apis.FieldError) field.ErrorList
func ConvertKnativeFieldErrorToInternalError ¶
func ConvertKnativeFieldErrorToInternalError(err *apis.FieldError) *field.Error
func HandleError ¶
HandleError handles error in requests
func IsTemporaryError ¶
IsTemporaryError this will check against a list of know non-temporary related errors like 403-Forbidden etc all others will be considered to be temporary
Types ¶
Click to show internal directories.
Click to hide internal directories.