Skip to content

Commit

Permalink
Handle errors when refreshing content in home screen
Browse files Browse the repository at this point in the history
  • Loading branch information
msasikanth committed Aug 16, 2023
1 parent ced7c74 commit 6522dac
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,11 @@ internal class HomeViewModel(
}

private fun refreshContent() {
viewModelScope.launch { updateLoadingState { rssRepository.updateFeeds() } }
try {
viewModelScope.launch { updateLoadingState { rssRepository.updateFeeds() } }
} catch (e: Exception) {
Sentry.captureException(e)
}
}

private suspend fun updateLoadingState(action: suspend () -> Unit) {
Expand Down

0 comments on commit 6522dac

Please sign in to comment.