In Bava Batra 16b Rava two verses for Iyov are compared
(איוב לד, לה) [איוב] לא בדעת ידבר ודבריו לא בהשכל (וכתיב (איוב מב, ז) כי לא דברתם אלי נכונה כעבדי איוב)
On the one hand, the text states: “Job has spoken without knowledge, and his words were without wisdom” (Job 34:35). But on the other hand, it is written with regard to Job’s friends: “You have not spoken of Me the thing that is right, like my servant Job” (Job 42:8).
To resolve the seeming contradiction Rava explains:
אמר רבא מכאן שאין אדם נתפס בשעת צערו
Rava said: From here it may be inferred that a person is not held responsible for what he says when he is in distress
Meaning that Elihu's statement that Iyov's words are without knowledge is technically correct, but Iyov is not held responsible for his mistaken speech because he spoke while he was suffering.
I would like to understand this statement in light of the premise of the book of Iyov overall. In the first two chapters the Satan has a conversation with God where he posits that the reason Iyov serves God is because Iyov is protected and essentially everything is well with him and his possessions. Remove that, argues the Satan, and Iyov will curse (written euphemistically as 'bless' in the pasuk) God to his face. To test this theory the Satan is given permission by God to cause the loss of all of Iyov's possessions and to physically afflict Iyov. But, given Rava's statement that a person is not held responsible for statements made while suffering, I cannot understand how Satan's test makes sense. If Iyov were to curse God as Satan suggests he would, wouldn't that curse be considered words said while in pain and therefore not be held against Iyov?
I am aware that some commentators explain "אין אדם נתפס בשעת צערו" to mean that a person is not punished for antinomian statements as opposed to those statements being considered as if they were not said at all. I do not find this reading compelling from the context of the Gemarah and the pesukim and will not accept this explanation as the correct answer