Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Surface streaming errors to be caught #243

Closed
wants to merge 2 commits into from
Closed
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
16 changes: 0 additions & 16 deletions library/src/main/java/org/xmtp/android/library/Conversations.kt
Original file line number Diff line number Diff line change
Expand Up @@ -674,14 +674,6 @@ data class Conversations(
}
} catch (error: CancellationException) {
break
} catch (error: StatusException) {
if (error.status.code == io.grpc.Status.Code.UNAVAILABLE) {
continue
} else {
break
}
} catch (error: Exception) {
continue
}
}
}
Expand Down Expand Up @@ -745,14 +737,6 @@ data class Conversations(
}
} catch (error: CancellationException) {
break
} catch (error: StatusException) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we be trying to reconnect when these errors happen. If we throw we leave it up to the app to handle reconnects

if (error.status.code == io.grpc.Status.Code.UNAVAILABLE) {
continue
} else {
break
}
} catch (error: Exception) {
continue
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rsappelit is this kind of what you had in mind? Instead of catching these StatusExceptions just let them be thrown so you can catch and handle them?

}
}
Expand Down
Loading