add error messages for different undelete case and test them