Jitsi meet handle error from prosody

Hello,
How can I send an error message from prosody module to jitsi meet, and how can I handle it in jitsi meet javascript code ?

Here is an example: https://github.com/jitsi/jitsi-meet/blob/master/resources/prosody-plugins/mod_muc_max_occupants.lua#L41
https://github.com/jitsi/lib-jitsi-meet/blob/master/modules/xmpp/ChatRoom.js#L1128