I hope you do not mind my using a Jewish reference.
Source: BAKON, S. (2013). SUBTLETIES IN THE STORY OF JOSEPH AND POTIPHAR'S WIFE. Jewish Bible Quarterly, 41(3), 171-174.
Now Potiphar, whose wrath was kindled (Gen. 39:19), could easily have
ordered Joseph's execution. Yet he doesn't fully trust his wife (see
Ibn Ezra and Ramban), a point that may be hinted at in the narrative,
which does not explicitly identify the object of Potiphar's anger.
For more information on the reasoning for Potiphar's distrust of his wife, you may want to consult the commentaries of the medieval Jewish scholars, Ibn Ezra and Ramban.
Using Rashi's commentary, Rashi says:
Now it came about when his master heard, etc.: During intercourse she
told him this, and that is the meaning of“Your slave did such things
to me,” [meaning] such acts of intimacy. [From Gen. Rabbah 87:9]
The irony comes into play when Rashi additionally notes Potiphar's wife's own marital infidelity, while disguising it as being seduced by Joseph. I presume that she wants to bear children with her husband, but somehow she can't, so she thinks she can seduce Joseph in order to claim an heir for her husband.
For she saw through her astrology that she was destined to raise
children from him (Joseph), but she did not know whether [they would
be] from her or from her daughter. [From Gen. Rabbah 85:2]
I think my presumption about Potiphar's wife is well-founded, because the following author tries to see the humanness in her and goes as far as giving her a name, Rahpitop, the backward-version of Potiphar.
Source: McKay, H. A. (1999). CONFRONTING REDUNDANCY AS MIDDLE MANAGER AND WIFE: THE FEISTY WOMAN OF GENESIS 39. Semeia, (87), 215.
McKay analyzes the text from two reading positions from the social sciences -- management theory and social anthropology -- and treats Rahpitop as a misunderstood, frustrated, maligned, and childless woman desiring motherhood. I'm a bit wary of McKay's interpretation, because McKay seems to suggest that Potiphar might be a eunuch, whereas Rashi suggests that she may have had children with Potiphar, but the children are not eligible to become heir, as they are female. I would side with the Jewish interpretation, since the Tanakh is the text of the Jewish people, unless McKay also happens to be fluent in Jewish history and culture.
The author Bakon makes note that the Genesis resembles a straightforward Egyptian tale, The Tale of Two Brothers, but the Genesis version has more nuances in the narration and dialogue. Bakon then adds:
As a mark of his esteem for Joseph (see Abrabanel), Potiphar merely
places him in a sohar, a prison for high-ranking offenders. There he
finds favor with the prison's commander and winds up as the person in
charge. With poetic justice, it is precisely this sorry incident with
Potiphar's wife that leads to Joseph's greatness.