pub type ErrorResponse = Status;Expand description
This type used to be a payload for kube::Error::Api. It has been replaced by Status.
In the interest of backward compatibility, we keep this type definition here as a deprecated alias.
Status better reflects the Kubernetes API conventions and is more versatile.
If you need to migrate your code, simply replace ErrorResponse with Status and also check
helper methods implemented on Status for easily identifying common error cases.
As a reference below is the original definition of this type:
An error response from the API. #[derive(Error, Deserialize, Serialize, Debug, Clone, Eq, PartialEq)] #[error(“{message}: {reason}”)] pub struct ErrorResponse { /// The status pub status: String, /// A message about the error #[serde(default)] pub message: String, /// The reason for the error #[serde(default)] pub reason: String, /// The error code pub code: u16, }
Aliased Type§
pub struct ErrorResponse {
pub status: Option<StatusSummary>,
pub code: u16,
pub message: String,
pub metadata: Option<ListMeta>,
pub reason: String,
pub details: Option<StatusDetails>,
}Fields§
§status: Option<StatusSummary>Status of the operation
One of: Success or Failure - more info
code: u16Suggested HTTP return code (0 if unset)
message: StringA human-readable description of the status of this operation
metadata: Option<ListMeta>Standard list metadata - more info
reason: StringA machine-readable description of why this operation is in the “Failure” status.
If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.
details: Option<StatusDetails>Extended data associated with the reason.
Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.