cloud-storage-rs icon indicating copy to clipboard operation
cloud-storage-rs copied to clipboard

BucketClient::list Returns Error on successful response

Open junbl opened this issue 2 years ago • 1 comments

BucketClient::list appears to always return an error:

[src/main.rs:6] client.bucket().list().await = Err(
    Reqwest(
        reqwest::Error {
            kind: Decode,
            source: Error("data did not match any variant of untagged enum GoogleResponse", line: 0, column: 0),
        },
    ),
)

It also seems to have some dbg!()s left in--it runs the query twice just to debug print it (which is how we can see that the response successfully gets the buckets).

junbl avatar Jul 05 '22 16:07 junbl

Looks like this is because I've got a bucket with a cors that includes only the method and origin fields, for whatever reason. This can be fixed by changing the max_age_seconds field on Cors to an Option<i32> and adding the #[serde(default)] annotation on all fields.

junbl avatar Jul 05 '22 17:07 junbl

Merged! Thanks a lot!

ThouCheese avatar Aug 25 '22 22:08 ThouCheese