Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) narrates that the Prophet (peace and blessings be upon him) said: "When one of you is invited to food, he should go. If he is not fasting, he should eat, and if he is fasting, he should supplicate for blessing."
Al-Tabarani recorded it in al-Mu'jam al-Kabir, and its narrators are thiqat (trustworthy).