mirror of
https://github.com/certbot/certbot.git
synced 2026-08-03 08:03:10 +02:00
Print error details when an IssuanceError is thrown (#9804)
When a CA fails to issue a certificate after finalisation Certbot currently prints the following unhelpful message: ``` An unexpected error occurred: acme.errors.IssuanceError ``` This PR makes Certbot print the ACME error object from the order, as such ``` An unexpected error occurred: CAA error :: Invalid CAA: CAA prohibits issuance ``` ## Pull Request Checklist - [ ] The Certbot team has recently expressed interest in reviewing a PR for this. If not, this PR may be closed due our limited resources and need to prioritize how we spend them. - [x] If the change being made is to a [distributed component](https://certbot.eff.org/docs/contributing.html#code-components-and-layout), edit the `master` section of `certbot/CHANGELOG.md` to include a description of the change being made. - [x] Add or update any documentation as needed to support the changes in this PR. - [x] Include your name in `AUTHORS.md` if you like.
This commit is contained in:
@@ -14,7 +14,7 @@ Certbot adheres to [Semantic Versioning](https://semver.org/).
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
*
|
* Fixed a bug where issuance error details where not printed
|
||||||
|
|
||||||
More details about these changes can be found on our GitHub repo.
|
More details about these changes can be found on our GitHub repo.
|
||||||
|
|
||||||
|
|||||||
@@ -373,8 +373,9 @@ def post_arg_parse_except_hook(exc_type: Type[BaseException], exc_value: BaseExc
|
|||||||
logger.error(str(exc_value))
|
logger.error(str(exc_value))
|
||||||
exit_func()
|
exit_func()
|
||||||
logger.error('An unexpected error occurred:')
|
logger.error('An unexpected error occurred:')
|
||||||
if messages.is_acme_error(exc_value):
|
acme_error = getattr(exc_value, "error", exc_value)
|
||||||
logger.error(display_util.describe_acme_error(cast(messages.Error, exc_value)))
|
if messages.is_acme_error(acme_error):
|
||||||
|
logger.error(display_util.describe_acme_error(cast(messages.Error, acme_error)))
|
||||||
else:
|
else:
|
||||||
output = traceback.format_exception_only(exc_type, exc_value)
|
output = traceback.format_exception_only(exc_type, exc_value)
|
||||||
# format_exception_only returns a list of strings each
|
# format_exception_only returns a list of strings each
|
||||||
|
|||||||
Reference in New Issue
Block a user