Add exception handling on xmpp endpoint