<commit_before>/**
 * /assets/linker/js/errors.js
 *
 * @file Error handling javascript functions that Taskboard application uses.
 * @author <NAME> <<EMAIL>>
 */

/**
 * Function handles possible socket error. This function is called after
 * any socket calls in application to make sure that all is ok.
 *
 * @param   {
 *          sails.error.socket|
 *          sails.json.type|
 *          sails.json.user|
 *          sails.json.phase|
 *          sails.json.milestone|
 *          sails.json.project|
 *          sails.json.sprint|
 *          sails.json.story|
 *          sails.json.task
 *          }                       error
 * @param   {Boolean}               [showMessage]
 */
function handleSocketError(error, showMessage) {
    showMessage = showMessage || true;

    console.log(error);

    // We have an error!
    if ((error.status && error.status !== 200) || (error.errors && error.status)) {
        if (showMessage) {
            var message = '';<commit_msg>Removed console.log.<commit_after>/**
 * /assets/linker/js/errors.js
 *
 * @file Error handling javascript functions that Taskboard application uses.
 * @author <NAME> <<EMAIL>>
 */

/**
 * Function handles possible socket error. This function is called after
 * any socket calls in application to make sure that all is ok.
 *
 * @param   {
 *          sails.error.socket|
 *          sails.json.type|
 *          sails.json.user|
 *          sails.json.phase|
 *          sails.json.milestone|
 *          sails.json.project|
 *          sails.json.sprint|
 *          sails.json.story|
 *          sails.json.task
 *          }                       error
 * @param   {Boolean}               [showMessage]
 */
function handleSocketError(error, showMessage) {
    showMessage = showMessage || true;

    // We have an error!
    if ((error.status && error.status !== 200) || (error.errors && error.status)) {
        if (showMessage) {
            var message = '';
{'fraction_non_alphanumeric': 0.12615384615384614, 'fraction_numerical': 0.003076923076923077, 'mean_word_length': 1.942684766214178, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3595464', 'n_tokens_mistral': 572, 'n_tokens_neox': 556, 'n_words': 142}