This function allows the data payload to be changed before being sent to Atatus. After inspecting the payload, if you wish to discard or abort the error send to Atatus, just return false value.

copy
icon/buttons/copy
atatus.onBeforeSend(function (payload) {
    // You can modify the payload or filter out sensitive information
    return true; // Return false here to abort the send
});

For hash based route change in pages, do the following.

copy
icon/buttons/copy
atatus.onBeforeSend(function (payload) {
    if (payload && payload.request && payload.request.url) {
        payload.request.url = payload.request.url.replace('/#/', '/');
    }
    return true;
});

To remove any secret token or key from Path before sending to Atatus, do the following

copy
icon/buttons/copy
// This callback removes a token or key from URL (i.e. new password and account activate URL).
// i.e /account/reset-password/fGkeXabNUVteCa changed to /account/reset-password/
//.    /account/activate/YNfaBChglKmW changed to /account/activate/
atatus.onBeforeSend(function (payload) {
    var url = (payload && payload.request && payload.request.url) || '';

    var filterPaths = ['/account/reset-password/', '/account/activate/'];

    for (var i = 0; i < filterPaths.length; i++) {

        var filterPath = filterPaths[i];
        var index = url.indexOf(filterPath)

        if (index > 0) {
            payload.request.url = url.substring(0, index + filterPath.length);
            break;
        }
    }

    return true;
});