Sunan Abi Dawud, Book 8, Hadith 69 (Abu Dawud 1485)

Abu Hurairah reported the Messenger of Allah (ﷺ) as saying:

"One of you is granted an answer (to his supplication) provided he does not say: 'I prayed but I was not granted an answer.'"