fix https://github.com/Daplie/letsencrypt-cli/issues/20, use corret error object e instead of err

This commit is contained in:
AJ ONeal 2016-08-11 08:41:30 -06:00
parent 218497ab0e
commit e3d4add0b9
1 changed files with 4 additions and 2 deletions

View File

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