onError

fun onError(handler: suspend (Throwable) -> Unit)

Sets the handler invoked when a polling error occurs.