wrtc.onChatMessageError() is an event function called when an error occurred while sending a chat message.
You must write your own wrtc.onChatMessageError() function to be able to tell user something went wrong.
wrtc.onChatMessageError(err)
The most common error is 404 (Not found) if you try to send a chat message to an unknown recipient.
Ignored.
{type:"chat", fromAddress:"foo@bar.com", errorCode:"404", errorMsg:"Not Found"}
wrtc.onChatMessageError = function(err) {
window.alert(err.fromAddress + ": error " + err.errorCode + ": " + err.errorMsg);
}