Fix error handling in ES plugin when polling cluster stats.