v3.0.9: bugfix error handling

This commit is contained in:
AJ ONeal 2020-01-10 16:55:44 -07:00
parent e8c46db062
commit aa324e2a29
4 changed files with 24 additions and 18 deletions

View File

@ -775,7 +775,14 @@ ACME._postChallenge = function(me, options, kid, auth) {
// REMOVE DNS records as soon as the state is non-processing
// (valid or invalid or other)
try {
options.challenges[auth.type].remove({ challenge: auth });
options.challenges[auth.type]
.remove({ challenge: auth })
.catch(function(err) {
err.action = 'challenge_remove';
err.altname = auth.altname;
err.type = auth.type;
ACME._notify(me, options, 'error', err);
});
} catch (e) {}
if ('valid' === resp.body.status) {

View File

@ -33,8 +33,8 @@ M.init = function(me) {
};
M._init = function(me, tz, locale) {
// prevent a stampede from misconfigured clients in an eternal loop
setTimeout(function() {
// prevent a stampede from misconfigured clients in an eternal loop
me.request({
method: 'GET',
url: 'https://api.rootprojects.org/api/nonce',
@ -60,8 +60,8 @@ M._init = function(me, tz, locale) {
locale: locale
}
};
return me
.request(req)
return me.request(req);
})
.catch(function(err) {
if (me.debug) {
console.error(
@ -74,7 +74,6 @@ M._init = function(me, tz, locale) {
oldCollegeTries[me.maintainerEmail] = true;
//console.log(resp);
});
});
}, me.__timeout || 3000);
};

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "@root/acme",
"version": "3.0.8",
"version": "3.0.9",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@root/acme",
"version": "3.0.8",
"version": "3.0.9",
"description": "Free SSL certificates for Node.js and Browsers. Issued via Let's Encrypt",
"homepage": "https://rootprojects.org/acme/",
"main": "acme.js",