<commit_before>import axios from 'axios';
import qs from 'qs';

const client = axios.create({
  xsrfCookieName: 'csrftoken',
  xsrfHeaderName: 'X-CSRFToken',
  timeout: 2000,
  paramsSerializer: function(params) {
    // Do custom querystring stingifying to comma separate array params
    return qs.stringify(params, { arrayFormat: 'comma' });
  },
});

client.interceptors.response.use(
  response => response,
  error => {
    let message;
    let url;
    let config;
    if (error.response) {
      config = error.response.config;
      url = config.url;
      message = error.response.statusText;
      // Don't send a Sentry report for permissions errors
      // Many 404s are in fact also unauthorized requests so
      // we should silence those on the front end and try
      // to catch legitimate request issues in the backend.
      //
      // Allow 418 too as that's specific to out of storage checks<commit_msg>removed timeout on client<commit_after>import axios from 'axios';
import qs from 'qs';

const client = axios.create({
  xsrfCookieName: 'csrftoken',
  xsrfHeaderName: 'X-CSRFToken',
  paramsSerializer: function(params) {
    // Do custom querystring stingifying to comma separate array params
    return qs.stringify(params, { arrayFormat: 'comma' });
  },
});

client.interceptors.response.use(
  response => response,
  error => {
    let message;
    let url;
    let config;
    if (error.response) {
      config = error.response.config;
      url = config.url;
      message = error.response.statusText;
      // Don't send a Sentry report for permissions errors
      // Many 404s are in fact also unauthorized requests so
      // we should silence those on the front end and try
      // to catch legitimate request issues in the backend.
      //
      // Allow 418 too as that's specific to out of storage checks
{'fraction_non_alphanumeric': 0.0940032414910859, 'fraction_numerical': 0.00864397622906537, 'mean_word_length': 2.9237288135593222, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '977569', 'n_tokens_mistral': 550, 'n_tokens_neox': 518, 'n_words': 192}