Class WalletSecureEnrollmentException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.gemalto.mfs.mwsdk.provisioning.exception.WalletSecureEnrollmentException
- All Implemented Interfaces:
Serializable
Errors pertaining to renewing may have different causes. In some cases,
the errors are linked to the HTTP protocol, others errors are handled and
observed within the SDK such as having invalid credentials, while with other
errors are linked to the CPS. This class allows the mobile wallet to
understand the root cause of a renewing error.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault error codestatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionWalletSecureEnrollmentException(WalletSecureEnrollmentErrorCodes sdkErrorCodes, int httpStatusCode, int cpsErrorCode, String errorMessage, Throwable causingException, Map<String, String> statusAdditionInfo) Constructor to create object of WalletSecureEnrollmentError.WalletSecureEnrollmentException(WalletSecureEnrollmentErrorCodes sdkErrorCodes, int httpStatusCode, int cpsErrorCode, String errorMessage, Map<String, String> statusAdditionInfo) Constructor to create object of WalletSecureEnrollmentError. -
Method Summary
Modifier and TypeMethodDescriptionThis methods returns the exception object that is responsible for the underlying issue.intReturns CPS error code.Returns the error message either from CPS or SDK.intReturns the http status code.Returns a code that can be associated with an error understood by the SDK.This is returned by the CPS on a failed processing of a request.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
CPS_ERROR_CODE_DEFAULT
public static final int CPS_ERROR_CODE_DEFAULTDefault error code- See Also:
-
HTTP_STATUS_CODE_DEFAULT
public static final int HTTP_STATUS_CODE_DEFAULT- See Also:
-
HTTP_STATUS_CODE_NO_INTERNET
public static final int HTTP_STATUS_CODE_NO_INTERNET- See Also:
-
-
Constructor Details
-
WalletSecureEnrollmentException
public WalletSecureEnrollmentException(WalletSecureEnrollmentErrorCodes sdkErrorCodes, int httpStatusCode, int cpsErrorCode, String errorMessage, Map<String, String> statusAdditionInfo) Constructor to create object of WalletSecureEnrollmentError.- Parameters:
sdkErrorCodes- error code as defined inWalletSecureEnrollmentErrorCodeshttpStatusCode- the http status codecpsErrorCode- error code as defined inKnownCpsErrorCodeserrorMessage- string describing the error that occurredstatusAdditionInfo- This is an optional field, which will contain complimentary information on the error that occurred. This value is provided by the CPS. For example, for a wrong activation code input, this HashMap will contain a key called "remainingTries" which will indicate the total number of tries that the end user has to correctly enter the activation code.
-
WalletSecureEnrollmentException
public WalletSecureEnrollmentException(WalletSecureEnrollmentErrorCodes sdkErrorCodes, int httpStatusCode, int cpsErrorCode, String errorMessage, Throwable causingException, Map<String, String> statusAdditionInfo) Constructor to create object of WalletSecureEnrollmentError.- Parameters:
sdkErrorCodes- error code as defined inWalletSecureEnrollmentErrorCodeshttpStatusCode- the http status codecpsErrorCode- error code as defined inKnownCpsErrorCodeserrorMessage- string describing the error that occurredcausingException- causing Exception for the errorstatusAdditionInfo- This is an optional field, which will contain complimentary information on the error that occurred. This value is provided by the CPS. For example, for a wrong activation code input, this HashMap will contain a key called "remainingTries" which will indicate the total number of tries that the end user has to correctly enter the activation code.
-
-
Method Details
-
getSdkErrorCode
Returns a code that can be associated with an error understood by the SDK. It is through this error code which will help the mobile wallet understand the root cause of the renewing error.- Returns:
- an error code of type
WalletSecureEnrollmentErrorCodes
-
getHttpStatusCode
public int getHttpStatusCode()Returns the http status code.- Returns:
- an int representation of the http status code.
-
getCpsErrorCode
public int getCpsErrorCode()Returns CPS error code.- Returns:
- returns an error code of type
KnownCpsErrorCodes
-
getErrorMessage
Returns the error message either from CPS or SDK.- Returns:
- String - error message received from server
-
getStatusAdditionalInfo
This is returned by the CPS on a failed processing of a request. This hash map is optional. If available, this will contain a list of key-value pairs which is expected to compliment the error from the CPS.- Returns:
- Map containing additional information on the error that has occurred. This is taken from the CPS response.
-
getCausingException
This methods returns the exception object that is responsible for the underlying issue. It can be null.- Returns:
- throwable
-