onRegistrationFailed method

void onRegistrationFailed(
  1. int errorCode,
  2. String errorMessage
)

Event handler called when the server notifies an error while registering an MPN device object.

By implementing this method it is possible to perform recovery actions.

  • errorCode The error code sent by the Server. It can be one of the following:
  • 40 - the MPN Module is disabled, either by configuration or by license restrictions.
  • 41 - the request failed because of some internal resource error (e.g. database connection, timeout, etc.).
  • 43 - invalid or unknown application ID.
  • 45 - invalid or unknown MPN device ID.
  • 48 - MPN device suspended.
  • 66 - an unexpected exception was thrown by the Metadata Adapter while authorizing the connection.
  • 68 - the Server could not fulfill the request because of an internal error.
  • <= 0 - the Metadata Adapter has refused the subscription request; the code value is dependent on the specific Metadata Adapter implementation.
- [errorMessage] The description of the error sent by the Server; it can be null.

Implementation

void onRegistrationFailed(int errorCode, String errorMessage) {}