error handling when service is on down or in maintenance #28

Öppen
Ghost vill sammanfoga 1 incheckningar från s[2]s in i master

Visa fil

@ -92,6 +92,9 @@ ACME.create = function create(me) {
}
return p.then(function() {
return ACME._directory(me).then(function(resp) {
if (resp.type && resp.type.indexOf("error") >= 0) {
throw new Error(resp.detail);
}
return fin(resp.body);
});
});