Skip to content

Server errors

Stanislav Slavin edited this page Jan 23, 2019 · 17 revisions

The MobileMessaging SDK provides an MobileMessagingError representation for the server error data. The following example demonstrates how an error code and a message attributes may be retrieved from the error object:

User user = new User();
user.setPhones(CollectionUtils.setOf("_&*70318xxxxx3"));
MobileMessaging.getInstance(this).saveUser(user, new MobileMessaging.ResultListener<User>() {
    @Override
    public void onResult(Result<User, MobileMessagingError> result) {

    	if (result.isSuccess()) {
    		// user saved
    	} else {
	        Log.e(TAG, result.getError().getCode()); // should print "5"
	        Log.e(TAG, result.getError().getMessage()); // should print "Invalid MSISDN format [10005]"
	    }
    }
});

The following table represents the info about all possible server errors:

Error code Error message Explanations
0 Something went wrong [10000] This is really unknown, and most likely we are already working to fix things
1 Invalid Application Id [10001] The application code you provided to the SDK doesn't exists
3 Invalid email format [10003] The user's email that you provided to the SDK has invalid format
5 Invalid MSISDN format [10005] The user's MSISDN that you provided to the SDK has invalid format
9 Failed to sync user data [10009] The user data that you provided to the SDK has invalid format. More info about User Data
2, 4, 7, 8, 10, 11, 12, 13 Internal service error [xxxxx] There is nothing you can do with these errors, except retrying later. Most likely we're already fixing stuff, but you are always welcome to ask for support at [email protected]
Clone this wiki locally