How would you wrap `CoroutineCallAdapterFactory` i...
# squarelibraries
g
How would you wrap
CoroutineCallAdapterFactory
into custom
ErrorCallAdapterFactory
? (In order to map some errors in a centralized fashion, same as
RxJavaCallAdapterFactory
exceptions are being usually wrapped and rethrown. ) Eventually, in my
CallAdapter
I'll have
originalAdapter?.adapt(originalCall)
, where the original one gives me an instance of
CompletableDeffered
I suppose. Means that
try/catch
won't work on this, right? Edit: I'm talking about Retrofit 2 CallAdapter.Factory for Kotlin coroutine's Deferred. UPD: Solved https://kotlinlang.slack.com/archives/C1CFAFJSK/p1553160868589100?thread_ts=1553155012.582400&cid=C1CFAFJSK