<commit_before>var dhttp = require('./')
var httpStatus = require('statuses/codes.json')

module.exports = function only200 (options, callback) {
  dhttp(options, function (err, result) {
    if (err) return callback(err)
    if (result.statusCode < 200 || result.statusCode >= 300) {
      var message = result.body
      if (!message) message = httpStatus[result.statusCode]

      return callback(new Error(message))
    }

    callback(null, result.body)
  })
}<commit_msg>use const in 200 variant<commit_after>const dhttp = require('./')
const httpStatus = require('statuses/codes.json')

module.exports = function only200 (options, callback) {
  dhttp(options, function (err, result) {
    if (err) return callback(err)
    if (result.statusCode < 200 || result.statusCode >= 300) {
      const message = result.body || httpStatus[result.statusCode]
      return callback(new Error(message))
    }

    callback(null, result.body)
  })
}
{'fraction_non_alphanumeric': 0.13361611876988336, 'fraction_numerical': 0.022269353128313893, 'mean_word_length': 3.841025641025641, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3879617', 'n_tokens_mistral': 300, 'n_tokens_neox': 276, 'n_words': 73}