#[non_exhaustive]pub enum Error {
Show 14 variants
AccessDeniedException(AccessDeniedException),
AuthorizationPendingException(AuthorizationPendingException),
ExpiredTokenException(ExpiredTokenException),
InternalServerException(InternalServerException),
InvalidClientException(InvalidClientException),
InvalidClientMetadataException(InvalidClientMetadataException),
InvalidGrantException(InvalidGrantException),
InvalidRequestException(InvalidRequestException),
InvalidRequestRegionException(InvalidRequestRegionException),
InvalidScopeException(InvalidScopeException),
SlowDownException(SlowDownException),
UnauthorizedClientException(UnauthorizedClientException),
UnsupportedGrantTypeException(UnsupportedGrantTypeException),
Unhandled(Unhandled),
}
Expand description
All possible error types for this service.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AccessDeniedException(AccessDeniedException)
You do not have sufficient access to perform this action.
AuthorizationPendingException(AuthorizationPendingException)
Indicates that a request to authorize a client with an access user session token is pending.
ExpiredTokenException(ExpiredTokenException)
Indicates that the token issued by the service is expired and is no longer valid.
InternalServerException(InternalServerException)
Indicates that an error from the service occurred while trying to process a request.
InvalidClientException(InvalidClientException)
Indicates that the clientId
or clientSecret
in the request is invalid. For example, this can occur when a client sends an incorrect clientId
or an expired clientSecret
.
InvalidClientMetadataException(InvalidClientMetadataException)
Indicates that the client information sent in the request during registration is invalid.
InvalidGrantException(InvalidGrantException)
Indicates that a request contains an invalid grant. This can occur if a client makes a CreateToken
request with an invalid grant type.
InvalidRequestException(InvalidRequestException)
Indicates that something is wrong with the input to the request. For example, a required parameter might be missing or out of range.
InvalidRequestRegionException(InvalidRequestRegionException)
Indicates that a token provided as input to the request was issued by and is only usable by calling IAM Identity Center endpoints in another region.
InvalidScopeException(InvalidScopeException)
Indicates that the scope provided in the request is invalid.
SlowDownException(SlowDownException)
Indicates that the client is making the request too frequently and is more than the service can handle.
Indicates that the client is not currently authorized to make the request. This can happen when a clientId
is not issued for a public client.
UnsupportedGrantTypeException(UnsupportedGrantTypeException)
Indicates that the grant type in the request is not supported by the service.
Unhandled(Unhandled)
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
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<CreateTokenError> for Error
impl From<CreateTokenError> for Error
Source§fn from(err: CreateTokenError) -> Self
fn from(err: CreateTokenError) -> Self
Source§impl From<CreateTokenWithIAMError> for Error
impl From<CreateTokenWithIAMError> for Error
Source§fn from(err: CreateTokenWithIAMError) -> Self
fn from(err: CreateTokenWithIAMError) -> Self
Source§impl From<RegisterClientError> for Error
impl From<RegisterClientError> for Error
Source§fn from(err: RegisterClientError) -> Self
fn from(err: RegisterClientError) -> Self
Source§impl<R> From<SdkError<CreateTokenError, R>> for Error
impl<R> From<SdkError<CreateTokenError, R>> for Error
Source§fn from(err: SdkError<CreateTokenError, R>) -> Self
fn from(err: SdkError<CreateTokenError, R>) -> Self
Source§impl<R> From<SdkError<CreateTokenWithIAMError, R>> for Error
impl<R> From<SdkError<CreateTokenWithIAMError, R>> for Error
Source§fn from(err: SdkError<CreateTokenWithIAMError, R>) -> Self
fn from(err: SdkError<CreateTokenWithIAMError, R>) -> Self
Source§impl<R> From<SdkError<RegisterClientError, R>> for Error
impl<R> From<SdkError<RegisterClientError, R>> for Error
Source§fn from(err: SdkError<RegisterClientError, R>) -> Self
fn from(err: SdkError<RegisterClientError, R>) -> Self
Source§impl<R> From<SdkError<StartDeviceAuthorizationError, R>> for Error
impl<R> From<SdkError<StartDeviceAuthorizationError, R>> for Error
Source§fn from(err: SdkError<StartDeviceAuthorizationError, R>) -> Self
fn from(err: SdkError<StartDeviceAuthorizationError, R>) -> Self
Source§impl From<StartDeviceAuthorizationError> for Error
impl From<StartDeviceAuthorizationError> for Error
Source§fn from(err: StartDeviceAuthorizationError) -> Self
fn from(err: StartDeviceAuthorizationError) -> 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 !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