Welcome to our new developer portal! Use the "Ask" button to chat with our AI Agent.
For the complete documentation index, see llms.txt. This page is also available as Markdown.

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:

  1. getSDKErrorCode()- to retrieve the type of error.

  2. If the type is :

    • SERVER_ERROR, use getServerErrorCode() to get the exact error that happened on MG server.

    • HTTP_ERROR, use getHTTPStatusCode() to get the HTTP status code caused by the communication error.

  3. Use getMessage() to retrieve a descriptive text of the error.

For more details about MobileGatewayError, refer to Android API

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?