Better error handling for update