handle an error case when updating metrics