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

[1.48.*] Pre-release merge #259

Merged
merged 2 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ user interface and experience to browse through the feeds, and supports Material
- Search
- Background sync
- Feed management: Add, Edit & Pin feeds
- Reader view with article fetching

## Tech Stack 📚

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import io.ktor.client.HttpClient
import io.ktor.client.request.get
import io.ktor.client.statement.bodyAsText
import io.ktor.http.HttpStatusCode
import io.sentry.kotlin.multiplatform.Sentry
import kotlinx.coroutines.withContext
import me.tatarka.inject.annotations.Inject

Expand All @@ -36,7 +37,12 @@ class PostSourceFetcher(
return withContext(dispatchersProvider.io) {
val response = httpClient.get(link)
if (response.status == HttpStatusCode.OK) {
response.bodyAsText()
try {
response.bodyAsText()
} catch (e: Exception) {
Sentry.captureException(e)
null
}
} else {
null
}
Expand Down
Loading