concatenate non-parseable response body to e.stack

This commit is contained in:
AJ ONeal 2016-04-04 11:45:25 -06:00
parent 764096a0b2
commit 526e19b23e
1 changed files with 2 additions and 0 deletions

View File

@ -30,6 +30,8 @@ module.exports.create = function (deps) {
try { try {
data = JSON.parse(data); data = JSON.parse(data);
} catch(e) { } catch(e) {
err.raw = data;
err.stack += '\n' + data;
cb(e); cb(e);
return; return;
} }