Where Iq stanza Errors are handled?

I see in chatRoom.js Presence stanza errors are handled. But I am not able to find Where Iq stanza error messages are handled.
I wanted to add some custom errors for one feature. so wanted to know where Iq errors are handled.
can anyone help?
Thanks in Advance.