Is catch (e: Throwable) too broad for response body conversions?
#74
Unanswered
yogurtearl
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This
catch (e: Throwable)will catchOutOfMemoryandNullPointerExceptionand wrap them inUnknownFailure.Could we catch something less broad here?
maybe rethrow any types that are in a
java.*package?Or many a way to customize which errors get converted to
UnknownFailureversus rethrown?EitherNet/src/main/java/com/slack/eithernet/ApiResult.kt
Lines 344 to 360 in 097f1a4
Beta Was this translation helpful? Give feedback.
All reactions