error handling on update