Improve API of interface WellknownRetriever to be able to distinguish between 404 and other errors.
This commit is contained in:
parent
b45fb2128b
commit
5b5c007cd2
2 changed files with 21 additions and 23 deletions
|
|
@ -286,7 +286,7 @@ class RustMatrixClient(
|
|||
override suspend fun getUrl(url: String): Result<ByteArray> = withContext(sessionDispatcher) {
|
||||
runCatchingExceptions {
|
||||
innerClient.getUrl(url)
|
||||
}
|
||||
}.mapFailure { it.mapClientException() }
|
||||
}
|
||||
|
||||
override suspend fun getRoom(roomId: RoomId): BaseRoom? = withContext(sessionDispatcher) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue