onFailure

abstract fun onFailure(call: Call<ReqBody, ResBody>, exception: HttpClientException)

Called when

  • the request could not be executed due to cancellation, a connectivity problem or timeout. Because networks can fail during an exchange, it is possible that the remote server accepted the request before the failure.

  • deserialization of raw response to desired Response Type failed

Parameters

call

The Call object that failed

exception

A concrete sub-class of HttpClientException

See also