diff options
author | Alex Auvolat <alex@adnab.me> | 2024-03-21 14:06:59 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2024-03-26 15:01:34 +0100 |
commit | 74949c69cbf1a8222b6d10a02fcf5fe139ccb560 (patch) | |
tree | 54128ccf24e8598c52c2a5366ad0b509bf1c296e /src/api/s3/error.rs | |
parent | 7e0107c47db71e8da13990c9111ebde8cbf60d8f (diff) | |
download | garage-74949c69cbf1a8222b6d10a02fcf5fe139ccb560.tar.gz garage-74949c69cbf1a8222b6d10a02fcf5fe139ccb560.zip |
[s3-checksum] implement x-amz-checksum-* headers
Diffstat (limited to 'src/api/s3/error.rs')
-rw-r--r-- | src/api/s3/error.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/api/s3/error.rs b/src/api/s3/error.rs index 5cb5d04e..2855e0b3 100644 --- a/src/api/s3/error.rs +++ b/src/api/s3/error.rs @@ -69,6 +69,10 @@ pub enum Error { #[error(display = "Invalid encryption algorithm: {:?}, should be AES256", _0)] InvalidEncryptionAlgorithm(String), + /// The client sent invalid XML data + #[error(display = "Invalid digest: {}", _0)] + InvalidDigest(String), + /// The client sent a request for an action not supported by garage #[error(display = "Unimplemented action: {}", _0)] NotImplemented(String), @@ -129,6 +133,7 @@ impl Error { Error::NotImplemented(_) => "NotImplemented", Error::InvalidXml(_) => "MalformedXML", Error::InvalidRange(_) => "InvalidRange", + Error::InvalidDigest(_) => "InvalidDigest", Error::InvalidUtf8Str(_) | Error::InvalidUtf8String(_) => "InvalidRequest", Error::InvalidEncryptionAlgorithm(_) => "InvalidEncryptionAlgorithmError", } @@ -148,6 +153,7 @@ impl ApiError for Error { | Error::InvalidPart | Error::InvalidPartOrder | Error::EntityTooSmall + | Error::InvalidDigest(_) | Error::InvalidEncryptionAlgorithm(_) | Error::InvalidXml(_) | Error::InvalidUtf8Str(_) |