diff --git a/app/src/main/java/com/nononsenseapps/feeder/model/RssLocalSync.kt b/app/src/main/java/com/nononsenseapps/feeder/model/RssLocalSync.kt index eb2d480ca..81541b159 100644 --- a/app/src/main/java/com/nononsenseapps/feeder/model/RssLocalSync.kt +++ b/app/src/main/java/com/nononsenseapps/feeder/model/RssLocalSync.kt @@ -171,21 +171,21 @@ class RssLocalSync(override val di: DI) : DIAware { ) { okHttpClient.getResponse(feedSql.url, forceNetwork = forceNetwork) }.flatMap { response -> - if (response.isSuccessful) { - response.use { + response.use { + if (response.isSuccessful) { response.body?.let { responseBody -> feedParser.parseFeedResponse( response.request.url.toUrl(), responseBody, ) } ?: NoBody(url = url.toString()).left() + } else { + HttpError( + url = url.toString(), + code = response.code, + message = response.message, + ).left() } - } else { - HttpError( - url = url.toString(), - code = response.code, - message = response.message, - ).left() } }.map { // Double check that icon is not base64