Skip to content

Commit

Permalink
chore(initDB): display better error message
Browse files Browse the repository at this point in the history
If the check document fails then display the error.
  • Loading branch information
petebacondarwin committed Jul 7, 2013
1 parent 330c082 commit 894872e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/initDB.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ var checkDocument = function(collection, query, done) {
console.log(url);
var params = { apiKey:apiKey, q: JSON.stringify(query) };
var request = rest.get(url, { qs: params, json: {} }, function(err, response, data) {
done(null, data);
if ( err ) {
console.log('There was an error checking the documents', err);
}
done(err, data);
});
};

Expand Down

0 comments on commit 894872e

Please sign in to comment.