Call function on error

Listen to events from the bot, and use them on your website.