#[non_exhaustive]pub enum Error {
InvalidRequestException(InvalidRequestException),
ResourceNotFoundException(ResourceNotFoundException),
TooManyRequestsException(TooManyRequestsException),
UnauthorizedException(UnauthorizedException),
Unhandled(Unhandled),
}Expand description
All possible error types for this service.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidRequestException(InvalidRequestException)
Indicates that a problem occurred with the input to the request. For example, a required parameter might be missing or out of range.
ResourceNotFoundException(ResourceNotFoundException)
The specified resource doesn't exist.
TooManyRequestsException(TooManyRequestsException)
Indicates that the request is being made too frequently and is more than what the server can handle.
Indicates that the request is not authorized. This can happen due to an invalid access token in the request.
Unhandled(Unhandled)
Matching Unhandled directly is not forwards compatible. Instead, match using a variable wildcard pattern and check .code():
err if err.code() == Some("SpecificExceptionCode") => { /* handle the error */ }
See ProvideErrorMetadata for what information is available for the error.
An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<BuildError> for Error
impl From<BuildError> for Error
Source§fn from(value: BuildError) -> Self
fn from(value: BuildError) -> Self
Source§impl From<GetRoleCredentialsError> for Error
impl From<GetRoleCredentialsError> for Error
Source§fn from(err: GetRoleCredentialsError) -> Self
fn from(err: GetRoleCredentialsError) -> Self
Source§impl From<ListAccountRolesError> for Error
impl From<ListAccountRolesError> for Error
Source§fn from(err: ListAccountRolesError) -> Self
fn from(err: ListAccountRolesError) -> Self
Source§impl From<ListAccountsError> for Error
impl From<ListAccountsError> for Error
Source§fn from(err: ListAccountsError) -> Self
fn from(err: ListAccountsError) -> Self
Source§impl From<LogoutError> for Error
impl From<LogoutError> for Error
Source§fn from(err: LogoutError) -> Self
fn from(err: LogoutError) -> Self
Source§impl<R> From<SdkError<GetRoleCredentialsError, R>> for Error
impl<R> From<SdkError<GetRoleCredentialsError, R>> for Error
Source§fn from(err: SdkError<GetRoleCredentialsError, R>) -> Self
fn from(err: SdkError<GetRoleCredentialsError, R>) -> Self
Source§impl<R> From<SdkError<ListAccountRolesError, R>> for Error
impl<R> From<SdkError<ListAccountRolesError, R>> for Error
Source§fn from(err: SdkError<ListAccountRolesError, R>) -> Self
fn from(err: SdkError<ListAccountRolesError, R>) -> Self
Source§impl<R> From<SdkError<ListAccountsError, R>> for Error
impl<R> From<SdkError<ListAccountsError, R>> for Error
Source§fn from(err: SdkError<ListAccountsError, R>) -> Self
fn from(err: SdkError<ListAccountsError, R>) -> Self
Source§impl<R> From<SdkError<LogoutError, R>> for Error
impl<R> From<SdkError<LogoutError, R>> for Error
Source§fn from(err: SdkError<LogoutError, R>) -> Self
fn from(err: SdkError<LogoutError, R>) -> Self
Source§impl ProvideErrorMetadata for Error
impl ProvideErrorMetadata for Error
Source§fn meta(&self) -> &ErrorMetadata
fn meta(&self) -> &ErrorMetadata
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more