Log call messages instead of throwing error (#1504)
Rather than throw an error, just log call messages and drop them. This way we distinguish them from incorrectly encoded content messages or new types of messages we don't support yet, and don't insert unnecessary red flags and stacktraces in debug logs. // FREEBIE
This commit is contained in:
@@ -38837,11 +38837,17 @@ MessageReceiver.prototype.extend({
|
||||
return this.handleDataMessage(envelope, content.dataMessage);
|
||||
} else if (content.nullMessage) {
|
||||
return this.handleNullMessage(envelope, content.nullMessage);
|
||||
} else if (content.callMessage) {
|
||||
return this.handleCallMessage(envelope, content.callMessage);
|
||||
} else {
|
||||
this.removeFromCache(envelope);
|
||||
throw new Error('Unsupported content message');
|
||||
}
|
||||
},
|
||||
handleCallMessage: function(envelope, nullMessage) {
|
||||
console.log('call message from', this.getEnvelopeId(envelope));
|
||||
this.removeFromCache(envelope);
|
||||
},
|
||||
handleNullMessage: function(envelope, nullMessage) {
|
||||
console.log('null message from', this.getEnvelopeId(envelope));
|
||||
this.removeFromCache(envelope);
|
||||
|
Reference in New Issue
Block a user