MG error management
Overview
This section covers the errors that can be returned from the MG module. For example when using the service MGCardEnrollmentService.
MobileGatewayError
In the MG module, all the errors are managed through the MobileGatewayError object.
The structure of the MobileGatewayError object is as follows:
SDK Error code: Provides the type of error that occurred.
Server Error code: The numerical code of the error to indicate the error caused on the server side.
HTTP Error code: The HTTP status code caused by communication errors.
Message: A description of the error.
The errors are to be parsed in the following way:
getSDKErrorCode()- to retrieve the type of error.If the type is :
SERVER_ERROR, usegetServerErrorCode()to get the exact error that happened on MG server.HTTP_ERROR, usegetHTTPStatusCode()to get the HTTP status code caused by the communication error.
Use
getMessage()to retrieve a descriptive text of the error.
MGErrorCode
MGErrorCode is the enum that provides all the error codes returned by the MG module to MPA during usage of public API of the MG module. This is part of public API of the MG module and please refer to Javadoc for details on each error code.
Last updated
Was this helpful?