onError

open override fun onError(t: Throwable)


fun onError(block: (Throwable) -> Unit)

Registers a callback invoked when the stream encounters an error. Can be called only once.