From ae5b7e1ec08b0a2ae73ff9c156144bcab88462b8 Mon Sep 17 00:00:00 2001 From: Sravan S Date: Tue, 2 Aug 2022 19:58:43 +0900 Subject: [PATCH] fix: catch exception from applicationUserListQuery --- .../CreateChannel/components/InviteUsers/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/smart-components/CreateChannel/components/InviteUsers/index.tsx b/src/smart-components/CreateChannel/components/InviteUsers/index.tsx index 388b46856..2ded4e865 100644 --- a/src/smart-components/CreateChannel/components/InviteUsers/index.tsx +++ b/src/smart-components/CreateChannel/components/InviteUsers/index.tsx @@ -41,6 +41,7 @@ const InviteUsers: React.FC = ({ const globalStore = useSendbirdStateContext(); const userId = globalStore?.config?.userId; const sdk = globalStore?.stores?.sdkStore?.sdk as SendbirdGroupChat; + const logger = globalStore?.config?.logger; const idsToFilter = [userId]; const [users, setUsers] = useState([]); const [selectedUsers, setSelectedUsers] = useState({}); @@ -57,6 +58,8 @@ const InviteUsers: React.FC = ({ setUsersDataSource(applicationUserListQuery); applicationUserListQuery.next().then((users_) => { setUsers(users_); + }).catch((error) => { + logger.warning('CreateChannel: applicationUserListQuery error', error); }); }, []);