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:26:20

˹Moses˺ said, "I did it, then, while I was of those astray.  

He, Moses, said, ‘I did that then, when I was astray, from the knowledge and the Message which God would later give me.
القرآن:٢٦:٢٠

قَالَ فَعَلْتُهَا إِذًا وَأَنَا مِنَ الضَّالِّينَ  

{قال} موسى {فعلتها إذاً} أي حينئذ {وأنا من الضالين} عما آتاني الله بعدها من العلم والرسالة.