rollbar.js icon indicating copy to clipboard operation
rollbar.js copied to clipboard

createTelemetryEvent doesn't allow network errors

Open driley-emoney opened this issue 7 years ago • 1 comments

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 avatar Sep 13 '19 16:09 driley-emoney

@driley-emoney thank you. Next release.

waltjones avatar Sep 14 '19 00:09 waltjones