kube_core/
error.rs

1use serde::{Deserialize, Serialize};
2use thiserror::Error;
3
4/// An error response from the API.
5#[derive(Error, Deserialize, Serialize, Debug, Clone, Eq, PartialEq)]
6#[error("{message}: {reason}")]
7pub struct ErrorResponse {
8    /// The status
9    pub status: String,
10    /// A message about the error
11    #[serde(default)]
12    pub message: String,
13    /// The reason for the error
14    #[serde(default)]
15    pub reason: String,
16    /// The error code
17    pub code: u16,
18}