diff options
Diffstat (limited to 'rust/fatcat-api-spec/src/client.rs')
| -rw-r--r-- | rust/fatcat-api-spec/src/client.rs | 21 | 
1 files changed, 21 insertions, 0 deletions
| diff --git a/rust/fatcat-api-spec/src/client.rs b/rust/fatcat-api-spec/src/client.rs index 5937b7f2..c5cf4297 100644 --- a/rust/fatcat-api-spec/src/client.rs +++ b/rust/fatcat-api-spec/src/client.rs @@ -2570,6 +2570,13 @@ impl Api for Client {                      Ok(CreateEditgroupResponse::Forbidden(body))                  } +                404 => { +                    let mut buf = String::new(); +                    response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; +                    let body = serde_json::from_str::<models::ErrorResponse>(&buf)?; + +                    Ok(CreateEditgroupResponse::NotFound(body)) +                }                  500 => {                      let mut buf = String::new();                      response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; @@ -2619,6 +2626,13 @@ impl Api for Client {                      Ok(GetChangelogResponse::Success(body))                  } +                400 => { +                    let mut buf = String::new(); +                    response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; +                    let body = serde_json::from_str::<models::ErrorResponse>(&buf)?; + +                    Ok(GetChangelogResponse::BadRequest(body)) +                }                  500 => {                      let mut buf = String::new();                      response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; @@ -2669,6 +2683,13 @@ impl Api for Client {                      Ok(GetChangelogEntryResponse::FoundChangelogEntry(body))                  } +                400 => { +                    let mut buf = String::new(); +                    response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; +                    let body = serde_json::from_str::<models::ErrorResponse>(&buf)?; + +                    Ok(GetChangelogEntryResponse::BadRequest(body)) +                }                  404 => {                      let mut buf = String::new();                      response.read_to_string(&mut buf).map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; | 
