In Taanis 25a there is a story with Levi where rain didn't come so he fasted. He then 'shot' words towards heaven, and Rabbi Elazar then says A person should never shoot words onto the God up high, since a great person did it and became lame. However, there is another gemara Berochos 31a with two other people, Eliyahu and Channah where we don't see anything happen to them. So why did Levi get punished for getting lame, or the other pshat it made him get into a position of lameness?
This article, by R' David Kochav, suggests that the difference is that Eliyahu and Chana (and Moshe, who the Gemara (Berachos 32a) tells us also "cast words" against Hashem) lived when there was a Mishkan/Beis Hamikdash. Levi, on the other hand, lived at a time when the Beis Hamikdash was no longer standing, and "the gates of prayer are closed" (Gemara ibid. 32b, and Bava Metzia 59a).
(He says that Maharsha writes something similar, although I haven't found it in any of the relevant Gemaras.)