<commit_before>var request = require('request')
var apiUrl = 'https://api.new.livestream.com/accounts/'

module.exports = {
  get: function(accountId, cb){
    request(apiUrl + accountId, function(err, res, body){
      if (!err && res.statusCode == 200) {
        cb(JSON.parse(body))
      } else {
        console.log(res, err)
      }
    })
  }
}<commit_msg>add callback error handling<commit_after>var request = require('request')
var apiUrl = 'https://api.new.livestream.com/accounts/'

module.exports = {
  get: function(accountId, cb){
    request(apiUrl + accountId, function(err, res, body){
      if (err) {
        cb(err)
      } else {
        cb(null, JSON.parse(body))
      }
    })
  }
}
{'fraction_non_alphanumeric': 0.16005665722379603, 'fraction_numerical': 0.00424929178470255, 'mean_word_length': 2.8010752688172045, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '6659951', 'n_tokens_mistral': 242, 'n_tokens_neox': 237, 'n_words': 47}