metrics: handling error when the metric server is out.