diff --git a/sandwich/src/commonMain/kotlin/com/skydoves/sandwich/ApiResponse.kt b/sandwich/src/commonMain/kotlin/com/skydoves/sandwich/ApiResponse.kt index 7ed9584b..32622ebe 100644 --- a/sandwich/src/commonMain/kotlin/com/skydoves/sandwich/ApiResponse.kt +++ b/sandwich/src/commonMain/kotlin/com/skydoves/sandwich/ApiResponse.kt @@ -108,7 +108,7 @@ public sealed interface ApiResponse { * @return A [ApiResponse.Failure.Exception] based on the throwable. */ public fun exception(ex: Throwable): Failure.Exception = - Failure.Exception(ex).apply { operate().maps() } + Failure.Exception(ex).operate().maps() as Failure.Exception /** * @author skydoves (Jaewoong Eum)