We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1caaf15 commit 84537eaCopy full SHA for 84537ea
examples/SampleApp/src/screens/ChannelScreen.tsx
@@ -129,8 +129,12 @@ export const ChannelScreen: React.FC<ChannelScreenProps> = ({
129
}
130
131
const newChannel = chatClient?.channel('messaging', channelId);
132
- if (!newChannel?.initialized) {
133
- await newChannel?.watch();
+ try {
+ if (!newChannel?.initialized) {
134
+ await newChannel?.watch();
135
+ }
136
+ } catch(error) {
137
+ console.log('An error has occurred while watching the channel: ', error);
138
139
setChannel(newChannel);
140
};
0 commit comments