<commit_before>'use strict';

var ParentHttpGateway = require('synapse-common/http/gateway');

var HttpGateway = ParentHttpGateway.extend({
    resolveResponse : function(resolve, data, headers, statusCode)
    {
        resolve({
            data    : data,
            headers : headers,
            status  : statusCode
        });
    },

    handleError : function(response, responseData, resolve, reject, method, path, data, headers, options)
    {
        if (response.statusCode === 401) {
            return this.handle401(resolve, reject, method, path, responseData, headers);
        }

        resolve({
            data    : responseData,
            headers : headers,
            status  : response.statusCode<commit_msg>Inject status code into response object<commit_after>'use strict';

var ParentHttpGateway = require('synapse-common/http/gateway');

var HttpGateway = ParentHttpGateway.extend({
    handleSuccess : function(resolve, data, headers, statusCode)
    {
        resolve({
            data    : data,
            headers : headers,
            status  : statusCode
        });
    },

    handleError : function(response, responseData, resolve, reject, method, path, data, headers, options)
    {
        if (response.statusCode === 401) {
            return this.handle401(resolve, reject, method, path, responseData, headers);
        }

        resolve({
            data    : responseData,
            headers : headers,
            status  : response.statusCode
{'fraction_non_alphanumeric': 0.10026737967914438, 'fraction_numerical': 0.008021390374331552, 'mean_word_length': 2.2685589519650655, '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': '2982896', 'n_tokens_mistral': 386, 'n_tokens_neox': 378, 'n_words': 98}