fun onError(callback: (String) -> Unit): Ref
Register an error callback
Note: the callback might be called on another thread
callback - A callback called when the channel has an error
callback
Return A ref that can be used with Channel.off