handle errors on update