onException
inline fun <T> ApiResponse<T>.onException(crossinline onResult: ApiResponse.Failure.Exception<T>.() -> Unit): ApiResponse<T>
Content copied to clipboard
Author
skydoves (Jaewoong Eum)
A scope function that would be executed for handling exception responses if the request get an exception.
Return
The original ApiResponse.
Parameters
onResult
The receiver function that receiving ApiResponse.Failure.Exception if the request get an exception.