diff --git a/api/src/androidTest/java/com/readrops/api/localfeed/LocalRSSDataSourceTest.kt b/api/src/androidTest/java/com/readrops/api/localfeed/LocalRSSDataSourceTest.kt index 017fd9fa..a03f6032 100644 --- a/api/src/androidTest/java/com/readrops/api/localfeed/LocalRSSDataSourceTest.kt +++ b/api/src/androidTest/java/com/readrops/api/localfeed/LocalRSSDataSourceTest.kt @@ -140,7 +140,7 @@ class LocalRSSDataSourceTest { localRSSDataSource.queryRSSResource(url.toString(), null) } - @Test(expected = ParseException::class) + @Test(expected = UnknownFormatException::class) fun noContentTypeTest() { mockServer.enqueue(MockResponse().setResponseCode(HttpURLConnection.HTTP_OK)) diff --git a/api/src/main/java/com/readrops/api/localfeed/LocalRSSDataSource.kt b/api/src/main/java/com/readrops/api/localfeed/LocalRSSDataSource.kt index 20a38da9..6069b2b0 100644 --- a/api/src/main/java/com/readrops/api/localfeed/LocalRSSDataSource.kt +++ b/api/src/main/java/com/readrops/api/localfeed/LocalRSSDataSource.kt @@ -37,7 +37,7 @@ class LocalRSSDataSource(private val httpClient: OkHttpClient) { return when { response.isSuccessful -> { val header = response.header(LibUtils.CONTENT_TYPE_HEADER) - ?: throw ParseException("Unable to get $url content-type") + ?: throw UnknownFormatException("Unable to get $url content-type") val contentType = LibUtils.parseContentType(header) ?: throw ParseException("Unable to parse $url content-type")