use crate::observability;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ErrorResponse {
#[serde(rename = "type")]
pub r#type: String,
#[serde(rename = "reason")]
pub reason: String,
#[serde(rename = "root_cause")]
pub root_cause: Vec<observability::RootCause>,
}
impl ErrorResponse {
pub fn new(r#type: String, reason: String, root_cause: Vec<observability::RootCause>) -> ErrorResponse {
ErrorResponse {
r#type,
reason,
root_cause,
}
}
}