He did in a way by flouting his self-righteousness. Job’s wife did suggest that he curse God, remember.
And God corrected Job for it, and we have the book of Job to learn from, which he didn’t.