1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, Serialize, Deserialize)]
4pub struct ApiErrorBody {
5 pub code: String,
6 pub message: String,
7 #[serde(default)]
8 pub errors: Option<Vec<ApiFieldError>>,
9}
10
11#[derive(Debug, Clone, Serialize, Deserialize)]
12pub struct ApiFieldError {
13 pub path: String,
14 pub message: String,
15 #[serde(default)]
16 pub code: Option<String>,
17}
18
19#[derive(Debug, Clone, Serialize, Deserialize)]
20pub struct RateLimitErrorBody {
21 pub code: String,
22 pub message: String,
23 pub retry_after: f64,
24 #[serde(default)]
25 pub global: Option<bool>,
26}