Do not use generic Exception

This commit is contained in:
Benoit Marty 2026-04-29 22:51:54 +02:00
parent 35a3a0ba06
commit 3dd2a60b3a

View file

@ -176,7 +176,7 @@ class DefaultSessionWellknownRetrieverTest {
Result.success("{}".toByteArray())
},
cacheStore = cacheStore,
jsonProvider = JsonProvider { throw Exception("Failed to parse JSON") }
jsonProvider = JsonProvider { error("Failed to parse JSON") }
)
assertThat(sut.getElementWellKnown()).isInstanceOf(WellknownRetrieverResult.Error::class.java)
// Ensure that the cache is deleted after the failure to parse it