The Messenger of Allah ﷺ said, "There are three about whom you need not ask. A man who departs from the community, disobeys his leader, and dies in a state of disobedience. A slave girl or slave who runs away and then dies. And a woman whose husband is absent, having sufficed her with the provisions of this world, yet she displays her adornments after his departure. Do not ask about these three.And there are three others about whom you need not ask. A man who contends with Allah over His garment, for His cloak is pride and His robe is might. A man who doubts the command of Allah. And one who despairs of the mercy of Allah."
حدثنا أبو عبد الرحمن حدثنا حيوة قال أخبرني أبو هانئ أن أبا علي عمرو بن مالك الجنبي حدثه
عن رسول الله ﷺ أنه قال ثلاثة لا تسأل عنهم رجل فارق الجماعة وعصى إمامه ومات عاصيا وأمة أو عبد أبق فمات وامرأة غاب عنها زوجها قد كفاها مؤنة الدنيا فتبرجت بعده فلا تسأل عنهم وثلاثة لا تسأل عنهم رجل نازع الله عز وجل رداءه فإن رداءه الكبرياء وإزاره العزة ورجل شك في أمر الله والقنوط من رحمة الله
Its chain of transmission is sahih. It appears in Bukhari's al-Adab (204, no. 590), and something close to it appears in Tabarani's al-Kabir (8/306, no. 788) and in Ibn Hibban (42, no. 50, al-Mawarid). Hakim graded it sahih (1/119), and Dhahabi agreed with him.