onError

fun onError(errorCallback: (err: Throwable) -> Unit): Task<T>

Lambda is called once error was thrown. Returns Task.