Once on being affected by Narada, Hanuman unwittingly offended Vishwamitra. This happened when Hanuman welcomed all the sages in Rama's court yet didn't welcome Vishwamitra in light of the fact that he wasn't a holy person by birth. 

Vishwamitra felt insulted and requested Rama to give a capital punishment for Hanuman. Capital punishment was executed, yet none of the bolts or even the brahmastra could hurt Hanuman. This was on the grounds that Hanuman continued reciting Rama's name.