mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 16:19:13 +02:00
Update ACME error namespace to match the new draft. (#3469)
* Update error namespace in acme package. * Use new error namespace in certbot. * fix lint and py26 errors. * Update with_code docstring. * @pde's suggestions
This commit is contained in:
committed by
Peter Eckersley
parent
f008fd0af9
commit
7773568332
+7
-5
@@ -12,6 +12,7 @@ import traceback
|
||||
import zope.component
|
||||
|
||||
from acme import jose
|
||||
from acme import messages
|
||||
|
||||
import certbot
|
||||
|
||||
@@ -691,11 +692,12 @@ def _handle_exception(exc_type, exc_value, trace, config):
|
||||
else:
|
||||
err = traceback.format_exception_only(exc_type, exc_value)[0]
|
||||
# Typical error from the ACME module:
|
||||
# acme.messages.Error: urn:acme:error:malformed :: The request message was
|
||||
# malformed :: Error creating new registration :: Validation of contact
|
||||
# mailto:none@longrandomstring.biz failed: Server failure at resolver
|
||||
if (("urn:acme" in err and ":: " in err and
|
||||
config.verbose_count <= cli.flag_default("verbose_count"))):
|
||||
# acme.messages.Error: urn:ietf:params:acme:error:malformed :: The
|
||||
# request message was malformed :: Error creating new registration
|
||||
# :: Validation of contact mailto:none@longrandomstring.biz failed:
|
||||
# Server failure at resolver
|
||||
if (messages.is_acme_error(err) and ":: " in err and
|
||||
config.verbose_count <= cli.flag_default("verbose_count")):
|
||||
# prune ACME error code, we have a human description
|
||||
_code, _sep, err = err.partition(":: ")
|
||||
msg = "An unexpected error occurred:\n" + err + "Please see the "
|
||||
|
||||
Reference in New Issue
Block a user