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:12:29

Joseph, ignore this. And, ˹my wife˺, ask forgiveness for your sin. Indeed, you were of the sinful."  

Then he said: O, Joseph, ignore this, matter and do not mention it ˹to anyone˺, lest it be broadcast; and you, O Zulaykhā, ask forgiveness for your sin: surely you have been of the erring’, the sinful; but the tale was reported and became public.
القرآن:١٢:٢٩

يُوسُفُ أَعْرِضْ عَنْ هَٰذَا ۚ وَاسْتَغْفِرِي لِذَنْبِكِ ۖ إِنَّكِ كُنْتِ مِنَ الْخَاطِئِينَ  

ثم قال يا {يوسف أعرض عن هذا} الأمر ولا تذكره لئلا يشيع {واستغفري} يا زليخا {لذنبك إنك كنت من الخاطئين} الآثمين، واشتهر الخبر وشاع.