Some exception handling in ESClient