Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:11:46

He said, "O Noah, indeed he is not of your family; indeed, he is ˹one whose˺ work was other than righteous, so ask Me not for that about which you have no knowledge. Indeed, I advise you, lest you be among the ignorant."  

He, ˹God˺ exalted be He, said: ‘O Noah, lo! he is not of your family, of those ˹who will be˺ saved, or of the followers of your religion; lo! it, that is, your asking me to save him, is not a righteous deed, for he is a disbeliever and there is no deliverance for disbelievers (‘āmalun ghayru sālihin, ‘it is not a righteous deed’: a variant reading has ‘āmila, the verb, with ghayra in the accusative, in which case the person governing ˹the verb ‘amila˺ is his son). So do not ask of Me (read either fa-lā tas’alanni, or fa-lā tas’alni) that whereof you have no knowledge, in respect to saving your son. I admonish you lest you be among the ignorant’, when you ask about what you do not know.
القرآن:١١:٤٦

قَالَ يَا نُوحُ إِنَّهُ لَيْسَ مِنْ أَهْلِكَ ۖ إِنَّهُ عَمَلٌ غَيْرُ صَالِحٍ ۖ فَلَا تَسْأَلْنِ مَا لَيْسَ لَكَ بِهِ عِلْمٌ ۖ إِنِّي أَعِظُكَ أَنْ تَكُونَ مِنَ الْجَاهِلِينَ  

{قال} تعالى {يا نوح إنه ليس من أهلك} الناجين أو من أهل دينك {إنه} أي سؤالك إياي بنجاته {عمل غير صالح} فإنه كافر ولا نجاة للكافرين وفي قراءة بكسر ميم عمل فعل ونصب غير فالضمير لابنه {فلا تسألنّ} بالتشديد والتخفيف {وما ليس لك به علم} من إنجاء ابنك {إني أعظك أن تكون من الجاهلين} بسؤالك ما لم تعلم.