rollbar.js
rollbar.js copied to clipboard
createTelemetryEvent doesn't allow network errors
Currently the createTelemetryEvent which is called from captureEvent, gets confused if you pass it
captureEvent('network', 'error', metadata);
First it will assign network as the type of event, but then when it sees error, it assigns its type as error. However that is the level, not the type.
https://github.com/rollbar/rollbar.js/blob/dcf46b1893bf2e7130129e6f423c92b5fc3cf10a/src/utility.js#L492
You should first check that type isn't already set, so that the level doesn't overwrite the type.
@driley-emoney thank you. Next release.