Author: Jason White [github@jasonwhite.io]
Hash: 2e1fe5194b8288d755a29dac335a249ec72daf35
Timestamp: Wed, 19 Feb 2020 05:24:41 +0000 (4 years ago)

+4 -3 +/-1 browse
Add better reporting of unknown S3 errors
1diff --git a/src/storage/s3.rs b/src/storage/s3.rs
2index 16e2569..a421eb2 100644
3--- a/src/storage/s3.rs
4+++ b/src/storage/s3.rs
5 @@ -69,9 +69,10 @@ impl From<RusotoError<HeadBucketError>> for InitError {
6 match r.status {
7 StatusCode::NOT_FOUND => InitError::Bucket,
8 StatusCode::FORBIDDEN => InitError::Credentials,
9- _ => {
10- InitError::Other("S3 returned an unknown error".into())
11- }
12+ _ => InitError::Other(format!(
13+ "S3 returned HTTP status {}",
14+ r.status
15+ )),
16 }
17 }
18 RusotoError::Service(HeadBucketError::NoSuchBucket(_)) => {