Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print error details when an IssuanceError is thrown #9804

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions certbot/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Certbot adheres to [Semantic Versioning](https://semver.org/).

* Fixed a bug where argument sources weren't correctly detected in abbreviated
arguments, short arguments, and some other circumstances
* Fixed a bug where issuance error details where not printed

More details about these changes can be found on our GitHub repo.

Expand Down
5 changes: 3 additions & 2 deletions certbot/certbot/_internal/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,9 @@ def exit_func() -> None:
logger.error(str(exc_value))
exit_func()
logger.error('An unexpected error occurred:')
if messages.is_acme_error(exc_value):
logger.error(display_util.describe_acme_error(cast(messages.Error, exc_value)))
acme_error = getattr(exc_value, "error", exc_value)
if messages.is_acme_error(acme_error):
logger.error(display_util.describe_acme_error(cast(messages.Error, acme_error)))
else:
output = traceback.format_exception_only(exc_type, exc_value)
# format_exception_only returns a list of strings each
Expand Down