-
Hi. Using Running `target/debug/aws`
got buckets: Err(
DispatchFailure(
ConnectorError {
err: hyper::Error(
IncompleteMessage,
),
kind: Other(
Some(
TransientError,
),
),
},
),
) use aws_sdk_s3::config;
use aws_sdk_s3::{Client, Credentials, Endpoint};
use aws_types::region::Region;
use http::Uri;
#[tokio::main]
async fn main() {
let cred = Credentials::new(
"access_key_id",
"secret_access_key",
None,
None,
"loaded-from-custom-env",
);
let ep = Endpoint::immutable(Uri::from_static("https://ceph.storage.net"));
let region = Region::new("us-west-2");
let conf_builder = config::Builder::new()
.endpoint_resolver(ep)
.region(region)
.credentials_provider(cred);
let conf = conf_builder.build();
let client = Client::from_conf(conf);
let buckets = client.list_buckets().send().await;
println!("got buckets: {:#?}", buckets);
} Change the -println!("got buckets: {:#?}", buckets);
+println!("got buckets: {:?}", buckets); Running `target/debug/aws`
got buckets: Ok(ListBucketsOutput { buckets: Some([Bucket { name: Some("bucket1"), creation_date: Some(DateTime { seconds: 1665474131, subsecond_nanos: 456000000 }) }]), owner: Some(Owner { display_name: Some("hopper1"), id: Some("hopper1") }) }) Is this considered a bug? PS:
|
Beta Was this translation helpful? Give feedback.
Answered by
jdisanti
Oct 11, 2022
Replies: 2 comments 1 reply
-
I think it's highly unlikely that the pretty printing is causing the error. You could confirm this by printing it both ways: println!("pretty: {buckets:#?}\nnot-pretty: {buckets:?}"); |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
azzamsa
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think it's highly unlikely that the pretty printing is causing the error. You could confirm this by printing it both ways: