Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions packages/common/src/store/pages/chat/sagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ function* doFetchLatestChats() {
let firstResponse: TypedCommsResponse<UserChat[]> | undefined
const currentUserId = yield* call(queryCurrentUserId)
if (!currentUserId) {
throw new Error('User not found')
// User is logged out - this is expected, don't report to Sentry
yield* put(fetchMoreChatsFailed())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we want to dispatch this action?

return
}
while (hasMoreChats) {
const response = yield* call([sdk.chats, sdk.chats.getAll], {
Expand Down Expand Up @@ -186,7 +188,9 @@ function* doFetchMoreChats() {
const before = summary?.prev_cursor
const currentUserId = yield* call(queryCurrentUserId)
if (!currentUserId) {
throw new Error('User not found')
// User is logged out - this is expected, don't report to Sentry
yield* put(fetchMoreChatsFailed())
return
}
const response = yield* call([sdk.chats, sdk.chats.getAll], {
userId: Id.parse(currentUserId),
Expand Down