java.lang.Object | |||
↳ | java.lang.Throwable | ||
↳ | java.lang.Exception | ||
↳ | com.amazon.identity.auth.device.AuthError |
This class encapsulates errors from External API Methods.
These errors are passed through onError
or it can be put into
an Intent
Bundle
for an error Activity
result.
Some instances of AuthError will contain a cause which will indicate the Exception
that caused
this AuthError.
This class also implements Parcelable
so that AuthError objects can be put into a Bundle.
All known errors will create a specific AuthError.ERROR_CATEGORY
and AuthError.ERROR_TYPE
, along with a
message. If there is an exception it will be added to the AuthError cause attribute. Below are the following error
categories:
ACTION
- Some action is required by the calling application in order to address
this issue. Consult the method documentation for specific error types (AuthError.ERROR_TYPE
) and what
actions are required.NETWORK
- Depending on the error type and the cause, you may want to retry the
operation or alert the user.INTERNAL
- Please report errors in these categories to our SDK support team and
provide logs. The type and cause may provide additional information in diagnosing the error.UNKNOWN
- Please report errors in these categories to our SDK support team and
provide logs. The type and cause may provide additional information in diagnosing the error.BAD_REQUEST
- This is not currently used by this SDK.All unhandled exceptions will create an Unknown Error in Unknown Category, along with a message and if there is an exception that triggered this it will be added to the AuthError cause attribute.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AuthError.ERROR_CATEGORY | Each AuthError has a category to help clients determine what generic action they want to take | ||||||||||
AuthError.ERROR_TYPE | Each AuthError has a type to help clients determine what detailed action they want to take |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | AUTH_ERROR_EXECEPTION | The name(key) used in an Intent bundle to store an AuthError object for Activity results | |||||||||
int | RESULT_AUTH_ERROR | Result Type returned when an Activity returns an error |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CREATOR | Helper method that generates instances of this Parcelable class from a Parcel. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Reconstruct AuthError object from a Parcel
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Implements an AIDL interface so that it can be used in the
AuthorizationListener AIDL
| |||||||||||
Helper Method to extract an AuthError from an Intent.
| |||||||||||
Helper Method to extract an AuthError from a Bundle.
| |||||||||||
Helper Method that gets a general AuthError object for unexpected errors, the class is passed in so that
a more detailed message can be generated.
| |||||||||||
Helper Method to that gets a general AuthError object for specific errors, the class is passed in so that
a more detailed message can be generated.
| |||||||||||
Helper Method to put the AuthError in a Bundle
| |||||||||||
Helper Method to help an Intent that has an AuthError put the AuthError in a Bundle
| |||||||||||
Helper Method that generates a Bundle with an AuthError in it based upon the throwable and the type, the class is passed in so that
a more detailed message can be generated.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
The name(key) used in an Intent bundle to store an AuthError object for Activity results
Result Type returned when an Activity returns an error
Helper method that generates instances of this Parcelable class from a Parcel.
Implements an AIDL interface so that it can be used in the AuthorizationListener
AIDL
Helper Method to extract an AuthError from an Intent. This will also log any exceptions thrown.
Helper Method to extract an AuthError from a Bundle. This will also log any exceptions thrown.
Helper Method that gets a general AuthError object for unexpected errors, the class is passed in so that a more detailed message can be generated.
Helper Method to that gets a general AuthError object for specific errors, the class is passed in so that a more detailed message can be generated.
Helper Method to put the AuthError in a Bundle
Helper Method to help an Intent that has an AuthError put the AuthError in a Bundle
Helper Method that generates a Bundle with an AuthError in it based upon the throwable and the type, the class is passed in so that a more detailed message can be generated.