error-handler for socket.io