onError

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

Register a handler for error events. Called when a connection or communication error occurs.

Parameters

handler

Suspend function called on error