fastly-rust
fastly-rust copied to clipboard
`fastly_api::apis::kv_store_item_api::set_value_for_key` fails to deserialize response body
Version fastly-api = "4.6.0"
What happened
The following successfully adds the key to the kv store, but returns an error when deserializing the response body:
use fastly_api::apis::configuration::{ApiKey, Configuration};
use fastly_api::apis::kv_store_item_api::{set_value_for_key, SetValueForKeyParams};
#[tokio::main]
async fn main() {
let mut config = Configuration {
api_key: Some(ApiKey {
prefix: None,
key: "OMITTED".into(),
}),
..Default::default()
};
let params = SetValueForKeyParams {
store_id: "OMITTED".into(),
key_name: "test".into(),
body: Some("test".into()),
..Default::default()
};
let out = set_value_for_key(&mut config, params).await;
dbg!(out);
}
output:
[src/main.rs:20:5] out = Err(
Serde(
Error("EOF while parsing a value", line: 1, column: 0),
),
)
the equivalent curl command works fine. im assuming this is because the function expects the endpoint to return a string, but the actual endpoint response doesn't contain a body.
Updating this ticket to mark that an internal ticket exists to track this issue.