Proper use of rg4js.send();

wasddd

Posted on
Nov 17 2017

Hi there,

currently we would like to implement our errorhandling and support it with manual sendings using sth. like this:

var errorhandling = {
handle_exception: function (err, tags, silent) {

    if (typeof tags === 'undefined') {
        tags = {};
    }

    if (typeof window.rg4js !== 'undefined') {
        if (typeof err === 'object') {
            window.rg4js('send', {
                error: JSON.stringify(err),
                customData: [{
                    tags: tags
                }]
            });
        } else {
            window.rg4js('send', {
                error: err,
                customData: [{
                    tags: tags
                }]
            });
        }
    }
}

However it seems like we don't receive these custom error messages in our raygun. Do you have an idea why that is?

Thanks!


Reply