# How to handle error in sendbird ui kit react native

**URL:** <https://community.sendbird.com/t/how-to-handle-error-in-sendbird-ui-kit-react-native/9014>\
**Category:** React Native\
**Tags:** group-channel, react-native\
**Created:** [February 6, 2024, 2:00pm UTC](https://community.sendbird.com/t/how-to-handle-error-in-sendbird-ui-kit-react-native/9014 "2024-02-06T14:00:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sumit\_Dey](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/sumit_dey/32/4819_2.png) [@Sumit\_Dey](https://community.sendbird.com/u/Sumit_Dey)\
**Post date:** [February 6, 2024, 2:00pm UTC](https://community.sendbird.com/t/how-to-handle-error-in-sendbird-ui-kit-react-native/9014/1 "2024-02-06T14:00:33Z")

</div>

**[Problem/Question]**  
How can I catch and handle error in Sendbird UI kit? I have enabled error boundary but still I am not able to catch. Although I can see the errors in terminal.

```auto
ERROR [UIKIT_android] Couldn't send message. [SendbirdError: Invalid parameters.]

ERROR [UIKIT_android] Couldn't send message. [SendbirdError: Receiver is blocked.]

Sometimes I get connection error as well, In that case, I need to catch the error and reconnect the user.

```

This is how my provider looks:

```auto
const SendbirdProvider = ({ children }: { children: React.ReactNode }) => {
  return (
    <SendbirdUIKitContainer
      appId="my-app-id"
      platformServices={platformServices}
      chatOptions={{
        // enableImageCompression: true,
        localCacheStorage,
        onInitialized: (sdkInstance) => {
          console.log("SENDBIRD_SDK INITIALIZED");
          return sdkInstance;
        },
      }}
      localization={{
        stringSet,
      }}
      uikitOptions={{
        groupChannel: {
          enableVoiceMessage: false,
          enableMention: false,
          enableOgtag: false,

          input: {
            enableDocument: false,
            camera: {
              enableVideo: false,
            },
            gallery: {
              enableVideo: false,
              enablePhoto: true,
            },
          },
        },
        groupChannelList: {
          enableTypingIndicator: true,
          enableMessageReceiptStatus: false,
        },
      }}
      styles={{
        theme: customTheme,
      }}
      errorBoundary={{
      disabled: false,
        onError: ({ error }) => {
          console.log("error handled in error errorBoundary", error);

          // Analytics.logError(error); // TODO : record error in bugsnag
        },
        ErrorInfoComponent: ({ error, reset }) => {
          return (
            <LeanView>
              <Text>{error.message}</Text>
              <Pressable onPress={reset}>reset uikit</Pressable>
            </LeanView>
          );
        },
      }}
      userProfile={{
        onCreateChannel: (user) => {
          // TODO : we can handle the redirect here from receive requests
          console.log("onCreateChannel", user);
        },
      }}
    >
      {children}
    </SendbirdUIKitContainer>
  );
};

```

* * *

```
"@sendbird/chat": "^4.10.6",
"@sendbird/uikit-react-native": "^3.4.0",

```

**[Reproduction Steps]**  
Straight Forward, just try to get any UIKit level error.

**[Current impact]**  
High

---

<div class="post-metadata">

**Author:** ![Jongtaek\_Oh](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/jongtaek_oh/32/5384_2.png) [@Jongtaek\_Oh](https://community.sendbird.com/u/Jongtaek_Oh)\
**Post date:** [August 31, 2024, 9:39am UTC](https://community.sendbird.com/t/how-to-handle-error-in-sendbird-ui-kit-react-native/9014/3 "2024-08-31T09:39:10Z")

</div>

Have you solved the problem?
