Better error management in delete project method