|
|
@@ -143,8 +143,8 @@ pub async fn get_price_feed(configuration: &configuration::Configuration, id: &s
|
|
|
let content = resp.text().await?;
|
|
|
match content_type {
|
|
|
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
|
|
|
- ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::RpcPriceFeed`"))),
|
|
|
- ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::RpcPriceFeed`")))),
|
|
|
+ ContentType::Text => Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::RpcPriceFeed`"))),
|
|
|
+ ContentType::Unsupported(unknown_type) => Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::RpcPriceFeed`")))),
|
|
|
}
|
|
|
} else {
|
|
|
let content = resp.text().await?;
|
|
|
@@ -183,8 +183,8 @@ pub async fn get_vaa(configuration: &configuration::Configuration, id: &str, pub
|
|
|
let content = resp.text().await?;
|
|
|
match content_type {
|
|
|
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
|
|
|
- ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetVaaResponse`"))),
|
|
|
- ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetVaaResponse`")))),
|
|
|
+ ContentType::Text => Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetVaaResponse`"))),
|
|
|
+ ContentType::Unsupported(unknown_type) => Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetVaaResponse`")))),
|
|
|
}
|
|
|
} else {
|
|
|
let content = resp.text().await?;
|
|
|
@@ -221,8 +221,8 @@ pub async fn get_vaa_ccip(configuration: &configuration::Configuration, data: st
|
|
|
let content = resp.text().await?;
|
|
|
match content_type {
|
|
|
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
|
|
|
- ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetVaaCcipResponse`"))),
|
|
|
- ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetVaaCcipResponse`")))),
|
|
|
+ ContentType::Text => Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetVaaCcipResponse`"))),
|
|
|
+ ContentType::Unsupported(unknown_type) => Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GetVaaCcipResponse`")))),
|
|
|
}
|
|
|
} else {
|
|
|
let content = resp.text().await?;
|
|
|
@@ -270,8 +270,8 @@ pub async fn latest_price_feeds(configuration: &configuration::Configuration, id
|
|
|
let content = resp.text().await?;
|
|
|
match content_type {
|
|
|
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
|
|
|
- ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::RpcPriceFeed>`"))),
|
|
|
- ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::RpcPriceFeed>`")))),
|
|
|
+ ContentType::Text => Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::RpcPriceFeed>`"))),
|
|
|
+ ContentType::Unsupported(unknown_type) => Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::RpcPriceFeed>`")))),
|
|
|
}
|
|
|
} else {
|
|
|
let content = resp.text().await?;
|
|
|
@@ -323,8 +323,8 @@ pub async fn latest_price_updates(configuration: &configuration::Configuration,
|
|
|
let content = resp.text().await?;
|
|
|
match content_type {
|
|
|
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
|
|
|
- ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PriceUpdate`"))),
|
|
|
- ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PriceUpdate`")))),
|
|
|
+ ContentType::Text => Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PriceUpdate`"))),
|
|
|
+ ContentType::Unsupported(unknown_type) => Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PriceUpdate`")))),
|
|
|
}
|
|
|
} else {
|
|
|
let content = resp.text().await?;
|
|
|
@@ -367,8 +367,8 @@ pub async fn latest_publisher_stake_caps(configuration: &configuration::Configur
|
|
|
let content = resp.text().await?;
|
|
|
match content_type {
|
|
|
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
|
|
|
- ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::LatestPublisherStakeCapsUpdateDataResponse`"))),
|
|
|
- ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::LatestPublisherStakeCapsUpdateDataResponse`")))),
|
|
|
+ ContentType::Text => Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::LatestPublisherStakeCapsUpdateDataResponse`"))),
|
|
|
+ ContentType::Unsupported(unknown_type) => Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::LatestPublisherStakeCapsUpdateDataResponse`")))),
|
|
|
}
|
|
|
} else {
|
|
|
let content = resp.text().await?;
|
|
|
@@ -421,8 +421,8 @@ pub async fn latest_twaps(configuration: &configuration::Configuration, window_s
|
|
|
let content = resp.text().await?;
|
|
|
match content_type {
|
|
|
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
|
|
|
- ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwapsResponse`"))),
|
|
|
- ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwapsResponse`")))),
|
|
|
+ ContentType::Text => Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwapsResponse`"))),
|
|
|
+ ContentType::Unsupported(unknown_type) => Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwapsResponse`")))),
|
|
|
}
|
|
|
} else {
|
|
|
let content = resp.text().await?;
|
|
|
@@ -462,8 +462,8 @@ pub async fn latest_vaas(configuration: &configuration::Configuration, ids_left_
|
|
|
let content = resp.text().await?;
|
|
|
match content_type {
|
|
|
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
|
|
|
- ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<String>`"))),
|
|
|
- ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<String>`")))),
|
|
|
+ ContentType::Text => Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<String>`"))),
|
|
|
+ ContentType::Unsupported(unknown_type) => Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<String>`")))),
|
|
|
}
|
|
|
} else {
|
|
|
let content = resp.text().await?;
|
|
|
@@ -497,8 +497,8 @@ pub async fn price_feed_ids(configuration: &configuration::Configuration, ) -> R
|
|
|
let content = resp.text().await?;
|
|
|
match content_type {
|
|
|
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
|
|
|
- ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<String>`"))),
|
|
|
- ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<String>`")))),
|
|
|
+ ContentType::Text => Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<String>`"))),
|
|
|
+ ContentType::Unsupported(unknown_type) => Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<String>`")))),
|
|
|
}
|
|
|
} else {
|
|
|
let content = resp.text().await?;
|
|
|
@@ -541,8 +541,8 @@ pub async fn price_feeds_metadata(configuration: &configuration::Configuration,
|
|
|
let content = resp.text().await?;
|
|
|
match content_type {
|
|
|
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
|
|
|
- ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::PriceFeedMetadata>`"))),
|
|
|
- ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::PriceFeedMetadata>`")))),
|
|
|
+ ContentType::Text => Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::PriceFeedMetadata>`"))),
|
|
|
+ ContentType::Unsupported(unknown_type) => Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::PriceFeedMetadata>`")))),
|
|
|
}
|
|
|
} else {
|
|
|
let content = resp.text().await?;
|
|
|
@@ -602,8 +602,8 @@ pub async fn price_stream_sse_handler(configuration: &configuration::Configurati
|
|
|
let content = resp.text().await?;
|
|
|
match content_type {
|
|
|
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
|
|
|
- ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PriceUpdate`"))),
|
|
|
- ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PriceUpdate`")))),
|
|
|
+ ContentType::Text => Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PriceUpdate`"))),
|
|
|
+ ContentType::Unsupported(unknown_type) => Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PriceUpdate`")))),
|
|
|
}
|
|
|
} else {
|
|
|
let content = resp.text().await?;
|
|
|
@@ -656,8 +656,8 @@ pub async fn timestamp_price_updates(configuration: &configuration::Configuratio
|
|
|
let content = resp.text().await?;
|
|
|
match content_type {
|
|
|
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
|
|
|
- ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PriceUpdate`"))),
|
|
|
- ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PriceUpdate`")))),
|
|
|
+ ContentType::Text => Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PriceUpdate`"))),
|
|
|
+ ContentType::Unsupported(unknown_type) => Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PriceUpdate`")))),
|
|
|
}
|
|
|
} else {
|
|
|
let content = resp.text().await?;
|