onErrorDeserialize
inline fun <T, E> ApiResponse<T>.onErrorDeserialize(json: Json = Json, crossinline onResult: ApiResponse.Failure.Error<T>.(E) -> Unit): ApiResponse<T>
Content copied to clipboard
Author
skydoves (Jaewoong Eum)
Since
1.2.7
A scope function that would be executed for handling error responses if the request failed.
Return
The original ApiResponse.
Parameters
json
Json instance that could be configured as needed.
onResult
The receiver function that receiving ApiResponse.Failure.Exception if the request failed.