mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-11-22 04:36:32 +00:00
Improve understanding of S3-related errors
This commit is contained in:
committed by
Clément Renault
parent
98be43b66b
commit
a829ded023
@@ -420,6 +420,8 @@ impl IndexScheduler {
|
|||||||
etags.push(etag.to_str().unwrap().to_owned());
|
etags.push(etag.to_str().unwrap().to_owned());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
eprintln!("Finalizing the multipart upload");
|
||||||
|
|
||||||
let action = bucket.complete_multipart_upload(
|
let action = bucket.complete_multipart_upload(
|
||||||
Some(&credential),
|
Some(&credential),
|
||||||
&object,
|
&object,
|
||||||
@@ -427,17 +429,13 @@ impl IndexScheduler {
|
|||||||
etags.iter().map(AsRef::as_ref),
|
etags.iter().map(AsRef::as_ref),
|
||||||
);
|
);
|
||||||
let url = action.sign(ONE_HOUR);
|
let url = action.sign(ONE_HOUR);
|
||||||
let resp = client
|
let resp = client.post(url).body(action.body()).send().await.unwrap();
|
||||||
.post(url)
|
let status = resp.status();
|
||||||
.body(action.body())
|
let text = resp.text().await.unwrap();
|
||||||
.send()
|
eprintln!("Status: {status}, Text: {text}");
|
||||||
.await
|
|
||||||
.unwrap()
|
|
||||||
.error_for_status()
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
// TODO do a better check and do not assert
|
// TODO do a better check and do not assert
|
||||||
assert!(resp.status().is_success());
|
// assert!(resp.status().is_success());
|
||||||
|
|
||||||
Result::<_, Error>::Ok(())
|
Result::<_, Error>::Ok(())
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user