Skip to content

Error Codes

The Intercom React Native wrapper surfaces errors from the underlying native iOS and Android SDKs as Promise rejections. You can catch these errors using standard JavaScript error handling patterns.

Handling errors

All Intercom methods return a Promise. When a call fails, the Promise is rejected with an error object containing a code (string) and message.

try {
  await Intercom.loginUserWithUserAttributes({ email: 'bob@example.com' });
} catch (error) {
  console.log('Error code:', error.code);   // e.g. '102'
  console.log('Error message:', error.message);
}

Or using Promise chains:

Intercom.loginUserWithUserAttributes({ email: 'bob@example.com' })
  .catch((error) => {
    console.log('Error code:', error.code);
    console.log('Error message:', error.message);
  });

List of error codes

The React Native bridge defines its own error codes that are returned as strings in error.code. These identify which operation failed:

User and identity error codes

Error CodeOperationDescription
101loginUnidentifiedUserAn error occurred while logging in an unidentified user.
102loginUserWithUserAttributesAn error occurred while logging in an identified user.
103setUserHashAn error occurred while setting the user hash for identity verification.
104updateUserAn error occurred while updating user attributes.
105logEventAn error occurred while logging an event.
106logoutAn error occurred while logging out the user. Android only.
107setLogLevel / getUnreadConversationCountAn error occurred while setting log level (Android) or fetching unread count (iOS).
109setUserJwtAn error occurred while setting a user JWT.
110setAuthTokensAn error occurred while setting authentication tokens.
111initializeAn error occurred while initializing the Intercom SDK.

Display error codes

Android only

The display error codes below are only returned on Android. On iOS, these operations always resolve successfully without error codes.

Error CodeOperationDescription
201presentAn error occurred while presenting the Messenger.
202presentMessageComposerAn error occurred while presenting the message composer.
203presentContentAn error occurred while presenting content (article, survey, carousel, etc.).
205setInAppMessageVisibilityAn error occurred while setting in-app message visibility.
206hideIntercomAn error occurred while hiding the Intercom UI.
208setLauncherVisibilityAn error occurred while setting launcher visibility.
209setBottomPaddingAn error occurred while setting the bottom padding.
210setThemeModeAn error occurred while setting the theme mode.

Push notification error codes

Error CodeOperationDescription
302sendTokenToIntercomAn error occurred while registering a device token for push notifications.

Help Center data API error codes

Error CodeOperationDescription
901fetchHelpCenterCollectionsAn error occurred while fetching Help Center collections.
902fetchHelpCenterCollectionAn error occurred while fetching the contents of a Help Center collection.
903searchHelpCenterAn error occurred while searching the Help Center.
Underlying native errors

The error.code values above identify which React Native bridge operation failed. Note that error.code is a string (e.g., '102'), not a number. The underlying cause comes from the native iOS or Android SDK. For detailed descriptions of native-level error codes, see the iOS error codes and Android error codes reference pages.