added error handling when invitation/ ad is deleted