<commit_before>var IPHistory = (function() {
    'use strict';

    function makeRequest() {
        var request = {login_history: 1, limit: 50};
        BinarySocket.send(request);
    }

    function responseHandler(msg) {
        var response = JSON.parse(msg.data);
        if (!response || response.msg_type !== 'login_history') {
            return;
        }
        if (response.error && response.error.message) {
            IPHistoryUI.displayError(response.error.message);
        }
        var parsed = response.login_history.map(IPHistoryData.parse);
        IPHistoryUI.displayTable(parsed);
    }

    // localize, title, create tables
    // register the callback on IPHistoryQueue
    function init() {
        IPHistoryUI.init();
        makeRequest();
    }

    function clean() {
        IPHistoryUI.clean();
    }

    return {
        init: init,
        clean: clean,
        responseHandler: responseHandler,
    };
})();
<commit_msg>Return immediately on error as per old behaviour<commit_after>var IPHistory = (function() {
    'use strict';

    function makeRequest() {
        var request = {login_history: 1, limit: 50};
        BinarySocket.send(request);
    }

    function responseHandler(msg) {
        var response = JSON.parse(msg.data);
        if (!response || response.msg_type !== 'login_history') {
            return;
        }
        if (response.error && response.error.message) {
            return IPHistoryUI.displayError(response.error.message);
        }
        var parsed = response.login_history.map(IPHistoryData.parse);
        IPHistoryUI.displayTable(parsed);
    }

    // localize, title, create tables
    // register the callback on IPHistoryQueue
    function init() {
        IPHistoryUI.init();
        makeRequest();
    }

    function clean() {
        IPHistoryUI.clean();
    }

    return {
        init: init,
        clean: clean,
        responseHandler: responseHandler,
    };
})();

{'fraction_non_alphanumeric': 0.11734693877551021, 'fraction_numerical': 0.003061224489795918, 'mean_word_length': 2.20949263502455, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5028735', 'n_tokens_mistral': 547, 'n_tokens_neox': 535, 'n_words': 118}