now ensuring the error event handler is attachted to every client