Marwan said to his doorkeeper Abu Rafi': Go to Ibn Abbas; and it was said to him: If every one of us who rejoices in what he has been given, and loves to be praised for what he does, is to be punished, then we will all be punished. Ibn Abbas (may Allah be pleased with them both) said: What have you to do with this verse? It was revealed only concerning the People of the Book. Then Ibn Abbas (may Allah be pleased with them both) recited the verse: "And when Allah took a covenant from those who were given the Scripture that you will surely make it clear to the people" [Surah Al Imran: 187] up to: "Never think that those who rejoice in what they have done and love to be praised for what they have not done" [Surah Al Imran: 188]. And Ibn Abbas (may Allah be pleased with them both) said: The Prophet (peace and blessings be upon him) asked them (the People of the Book) about something, and out of envy they concealed it and told him something else instead. Then they went out happy that they had made him ((peace and blessings be upon him)) believe that they had told him what he ((peace and blessings be upon him)) had asked them, and they sought his praise for that, and they also rejoiced in what they had done by concealing the real matter.
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 10684