add error handler on client connection