Simplify logAndMapErrors calls

This commit is contained in:
Kirill Kamakin
2022-08-05 21:54:52 +02:00
parent 5297419b33
commit 81e06dc1d8
4 changed files with 17 additions and 23 deletions

View File

@@ -19,8 +19,7 @@ class VersionDataSourceImpl @Inject constructor(
logger.v { "getVersionInfo() called with: baseUrl = $baseUrl" }
val service = serviceFactory.provideService(baseUrl)
val response = logAndMapErrors(
logger,
val response = logger.logAndMapErrors(
block = { service.getVersion() },
logProvider = { "getVersionInfo: can't request version" }
)