Permalink
Browse files

Cleanup

  • Loading branch information...
mddub committed Jan 7, 2016
1 parent 2e8b5ac commit 7907df22a1394362070e8a896a3592b10f1de5d5
Showing with 4 additions and 3 deletions.
  1. +4 −3 carelink.js
View
@@ -3,8 +3,7 @@
var _ = require('lodash'),
common = require('common'),
request = require('request'),
zlib = require('zlib');
request = require('request');
var logger = require('./logger');
@@ -129,11 +128,13 @@ var Client = exports.Client = function (options) {
}
function parseData(response, next) {
var parsed;
try {
next(null, JSON.parse(response.body));
parsed = JSON.parse(response.body);
} catch (e) {
next(e);
}
next(null, parsed);
}
function firstFetch(callback) {

0 comments on commit 7907df2

Please sign in to comment.