Skip to main content

S3ServiceError

Enum S3ServiceError 

Source
pub enum S3ServiceError {
Show 40 variants NoSuchBucket { bucket: String, }, BucketAlreadyExists { bucket: String, }, BucketAlreadyOwnedByYou { bucket: String, }, BucketNotEmpty { bucket: String, }, NoSuchKey { key: String, }, NoSuchVersion { key: String, version_id: String, }, NoSuchUpload { upload_id: String, }, InvalidPartOrder, InvalidPart, EntityTooSmall, EntityTooLarge, InvalidBucketName { name: String, reason: String, }, InvalidArgument { message: String, }, InvalidRange, InvalidTag { message: String, }, MalformedXml, AccessDenied, MethodNotAllowed, NotImplemented, PreconditionFailed, ConditionalRequestConflict, NotModified, InvalidObjectState, ObjectNotInActiveTierError, InvalidDigest, BadDigest, MissingContentLength, KeyTooLong, MaxMessageLengthExceeded, NoSuchCorsConfiguration, NoSuchTagSet, NoSuchLifecycleConfiguration, NoSuchBucketPolicy, NoSuchWebsiteConfiguration, NoSuchPublicAccessBlockConfiguration, ServerSideEncryptionConfigurationNotFoundError, ObjectLockConfigurationNotFoundError, OwnershipControlsNotFoundError, ReplicationConfigurationNotFoundError, Internal(Error),
}
Expand description

S3 service error type.

Each variant corresponds to a well-known S3 error code. Converting to S3Error via From attaches the correct error code and a human-readable message; the HTTP status code is derived automatically from the error code.

Variants§

§

NoSuchBucket

The specified bucket does not exist.

Fields

§bucket: String

The bucket name that was not found.

§

BucketAlreadyExists

The requested bucket name is not available (owned by another account).

Fields

§bucket: String

The bucket name that already exists.

§

BucketAlreadyOwnedByYou

The bucket already exists and is owned by you.

Fields

§bucket: String

The bucket name that already exists.

§

BucketNotEmpty

The bucket is not empty and cannot be deleted.

Fields

§bucket: String

The bucket name that is not empty.

§

NoSuchKey

The specified key does not exist.

Fields

§key: String

The key that was not found.

§

NoSuchVersion

The specified version does not exist.

Fields

§key: String

The key for the version.

§version_id: String

The version ID that was not found.

§

NoSuchUpload

The specified multipart upload does not exist.

Fields

§upload_id: String

The upload ID that was not found.

§

InvalidPartOrder

The list of parts was not in ascending order.

§

InvalidPart

One or more of the specified parts could not be found.

§

EntityTooSmall

A proposed upload part is smaller than the minimum allowed size.

§

EntityTooLarge

The entity body is too large.

§

InvalidBucketName

The specified bucket name is not valid.

Fields

§name: String

The invalid bucket name.

§reason: String

The reason for the error.

§

InvalidArgument

An argument provided is invalid.

Fields

§message: String

Description of the invalid argument.

§

InvalidRange

The requested range is not satisfiable.

§

InvalidTag

A tag key or value is invalid.

Fields

§message: String

Description of the tag error.

§

MalformedXml

The XML body is malformed.

§

AccessDenied

Access denied.

§

MethodNotAllowed

The HTTP method is not allowed against this resource.

§

NotImplemented

The requested functionality is not implemented.

§

PreconditionFailed

A precondition specified in the request was not met.

§

ConditionalRequestConflict

The conditional request cannot be processed.

§

NotModified

The resource has not been modified (304).

§

InvalidObjectState

The operation is not valid for the object’s storage class.

§

ObjectNotInActiveTierError

The object is not in an active tier.

§

InvalidDigest

The Content-MD5 you specified is invalid.

§

BadDigest

The Content-MD5 you specified did not match what we received.

§

MissingContentLength

Missing Content-Length header.

§

KeyTooLong

The key is too long.

§

MaxMessageLengthExceeded

The message body exceeds the maximum length.

§

NoSuchCorsConfiguration

The CORS configuration does not exist.

§

NoSuchTagSet

The tag set does not exist.

§

NoSuchLifecycleConfiguration

The lifecycle configuration does not exist.

§

NoSuchBucketPolicy

The bucket policy does not exist.

§

NoSuchWebsiteConfiguration

The website configuration does not exist.

§

NoSuchPublicAccessBlockConfiguration

The public access block configuration does not exist.

§

ServerSideEncryptionConfigurationNotFoundError

The server-side encryption configuration does not exist.

§

ObjectLockConfigurationNotFoundError

The object lock configuration does not exist.

§

OwnershipControlsNotFoundError

The ownership controls configuration does not exist.

§

ReplicationConfigurationNotFoundError

The replication configuration does not exist.

§

Internal(Error)

Internal error with context.

Implementations§

Source§

impl S3ServiceError

Source

pub fn into_s3_error(self) -> S3Error

Convert this error into an S3Error.

This is equivalent to S3Error::from(self) but available as a method for convenience in chained calls.

Trait Implementations§

Source§

impl Debug for S3ServiceError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for S3ServiceError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for S3ServiceError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Error> for S3ServiceError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<S3ServiceError> for S3Error

Source§

fn from(err: S3ServiceError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more