twilio / twilio-client.js

Twilio’s Programmable Voice JavaScript SDK
https://www.twilio.com/docs/voice/client/javascript
Other
67 stars 32 forks source link

[BUG] Endpoint analytics cause mysterious errors in Javascript console #249

Open laurglia opened 3 years ago

laurglia commented 3 years ago

Code to reproduce the issue:

This is a general issue, so all you need to do is create a call with Twilio Client.

Steps to reproduce:

  1. Block requests to eventgw.twilio.com/v4/EndpointEvents in Chrome Network tab.
  2. Start a call.
  3. Observe that there is a large number of errors without any message in the console.

These errors are caused by requests failing to EndpointEvents endpoint.

Expected behavior:

There should be an error/warning logged with meaningful message. For example, when a request to EndpointMetrics fails, then the following warning is logged

image

This is probably how it should work for EndpointEvents as well.

Our application reports all uncaught errors which we later investigate and these errors create a lot of noise and are hard to filter out at the moment.

Actual behavior:

There are errors in console without a message.

image

Software versions:

Affects the latest Twilio Client version regardless of browser, operating system, 3rd party libraries.

ryan-rowland commented 3 years ago

Thank you for the report @laurglia. I've opened an internal ticket for this. I agree, we should not be throwing uncaught errors here.