Package errors provides detailed error types for api field validation.
const ( StatusUnprocessableEntity = 422 StatusTooManyRequests = 429 // HTTP recommendations are for servers to define 5xx error codes // for scenarios not covered by behavior. In this case, ServerTimeout // is an indication that a transient server error has occured and the // client *should* retry, with an optional Retry-After header to specify // the back off window. StatusServerTimeout = 504 )
HTTP Status codes not in the golang http package.
FromObject generates an StatusError from an api.Status, if that is the type of obj; otherwise, returns an UnexpecteObjectError.
IsAlreadyExists determines if the err is an error which indicates that a specified resource already exists.
IsBadRequest determines if err is an error which indicates that the request is invalid.
IsConflict determines if the err is an error which indicates the provided update conflicts.
IsForbidden determines if err is an error which indicates that the request is forbidden and cannot be completed as requested.
IsInvalid determines if the err is an error which indicates the provided resource is not valid.
IsMethodNotSupported determines if the err is an error which indicates the provided action could not be performed because it is not supported by the server.
IsNotFound returns true if the specified error was created by NewNotFoundErr.
IsServerTimeout determines if err is an error which indicates that the request needs to be retried by the client.
IsUnauthorized determines if err is an error which indicates that the request is unauthorized and requires authentication by the user.
IsUnexpectedObjectError determines if err is due to an unexpected object from the master.
IsUnexpectedServerError returns true if the server response was not in the expected API format, and may be the result of another HTTP actor.
NewAlreadyExists returns an error indicating the item requested exists by that identifier.
NewBadRequest creates an error that indicates that the request is invalid and can not be processed.
NewConflict returns an error indicating the item can't be updated as provided.
NewForbidden returns an error indicating the requested action was forbidden
NewGenericServerResponse returns a new error for server responses that are not in a recognizable form.
NewInternalError returns an error indicating the item is invalid and cannot be processed.
NewInvalid returns an error indicating the item is invalid and cannot be processed.
NewMethodNotSupported returns an error indicating the requested action is not supported on this kind.
NewNotFound returns a new error which indicates that the resource of the kind and the name was not found.
NewServerTimeout returns an error indicating the requested action could not be completed due to a transient error, and the client should try again.
NewTimeoutError returns an error indicating that a timeout occurred before the request could be completed. Clients may retry, but the operation may still complete.
NewUnauthorized returns an error indicating the client is not authorized to perform the requested action.
SuggestsClientDelay returns true if this error suggests a client delay as well as the suggested seconds to wait, or false if the error does not imply a wait.
StatusError is an error intended for consumption by a REST API server; it can also be reconstructed by clients from a REST response. Public to allow easy type switches.
DebugError reports extended info about the error to debug output.
Error implements the Error interface.
Status allows access to e's status without having to know the detailed workings of StatusError. Used by pkg/apiserver.
UnexpectedObjectError can be returned by FromObject if it's passed a non-status object.
Error returns an error message describing 'u'.
|etcd||Package etcd provides conversion of etcd errors to API errors.|