Did you supplicate for anything or beg of Him about that? He said: Yes. I used to utter (these words): Impose punishment upon me earlier in this world, what Thou art going to impose upon me in the Hereafter. Thereupon Messenger of Allah ﷺ said: Hallowed be Allah, you have neither the power nor forbearance to take upon yourself (the burden of His Punishment). Why did you not say this: O Allah, grant us good in the world and good in the Hereafter, and save us from the torment of Fire. He (the Holy Prophet) made this supplication (for him) and he was all right. (Using translation from Muslim 2688a)
أَنَّ رَسُولَ اللهِ ﷺ عَادَ رَجُلًا مِنَ الْمُسْلِمِينَ قَدْ صَارَ مِثْلَ الْفَرْخِ فَقَالَ لَهُ رَسُولُ اللهِ ﷺ هَلْ كُنْتَ تَدْعُو بِشَيْءٍ أَوْ تَسْأَلُهُ إِيَّاهُ؟ قَالَ نَعَمْ كُنْتُ أَقُولُ اللهُمَّ مَا كُنْتَ مُعَاقِبِي بِهِ فِي الْآخِرَةِ فَعَجِّلْهُ لِي فِي الدُّنْيَا فَقَالَ رَسُولُ اللهِ ﷺ سُبْحَانَ اللهِ لَا تُطِيقُهُ وَلَا تَسْتَطِيعُهُ فَهَلَّا قُلْتَ اللهُمَّ آتِنَا فِي الدُّنْيَا حَسَنَةً وَفِي الْآخِرَةِ حَسَنَةً وَقِنَا عَذَابَ النَّارِ قَالَ فَدَعَا اللهَ ﷻ فَشَفَاهُ اللهُ ﷻ