The Prophet ﷺ said, "...There will remain a man whose face is turned toward the Fire. He will say, 'My Lord, its stench has poisoned me and its blaze has burned me. Turn my face away from the Fire.' He will keep calling upon Allah, and Allah will say, 'If I grant you this, will you ask Me for something else?' He will reply, 'No, by Your might, I will not ask You for anything else'..." and the hadith continues.
عن النبي ﷺ قال:… ويبقى رجل مقبل بوجهه على النار، فيقول: يا رب قد قشبني ريحها وأحرقني ذكاؤها، فاصرف وجهيي عن النار، فلا يزال يدعو الله، فيقول: لعلك إن أعطيتك أن تسألني غيره؟ فيقول: لا وعزتك لا أسألك غيره… الحديث.
Bukhari narrated it in the Book of Heart-Softening Matters (6573), and Muslim narrated it in the Book of Faith (299:182), both through the route of Ibn Shihab Zuhri, from Ata bin Yazid Laythi, from Abu Hurairah. He then related the hadith in full.