Skip to content

Review and implement display of subproblems  #9273

Closed as not planned
Closed as not planned

Description

@alexzorin

#7046 implemented subproblems in acme.

At the moment, Certbot doesn't have a consistent way to display subproblems. acme.messages.Error.__str__ does now provide a way to print them:

def __str__(self) -> str:
result = b' :: '.join(
part.encode('ascii', 'backslashreplace') for part in
(self.typ, self.description, self.detail, self.title)
if part is not None).decode()
if self.identifier:
result = f'Problem for {self.identifier.value}: ' + result # pylint: disable=no-member
if self.subproblems and len(self.subproblems) > 0:
for subproblem in self.subproblems:
result += f'\n{subproblem}'
return result

but recently in Certbot, we started using an internal utility to display errors which ignores subproblems:

def describe_acme_error(error: acme_messages.Error) -> str:
"""Returns a human-readable description of an RFC7807 error.
:param error: The ACME error
:returns: a string describing the error, suitable for human consumption.
:rtype: str
"""
parts = (error.title, error.detail)
if any(parts):
return ' :: '.join(part for part in parts if part is not None)
if error.description:
return error.description
return error.typ

To implement the display of subproblems, I think we should:

  • Audit where Certbot can potentially display acme.messages.Error
  • Audit what kind of operations are likely to involve subproblems
  • Investigate how we can display subproblems and how it meshes with the broader UX of Certbot

Activity

  1. added
    priority: significant
    on Apr 8, 2022
  2. github-actions commented on Apr 8, 2023

    @github-actions

    We've made a lot of changes to Certbot since this issue was opened. If you still have this issue with an up-to-date version of Certbot, can you please add a comment letting us know? This helps us to better see what issues are still affecting our users. If there is no activity in the next 30 days, this issue will be automatically closed.

  3. github-actions commented on May 9, 2023

    @github-actions

    This issue has been closed due to lack of activity, but if you think it should be reopened, please open a new issue with a link to this one and we'll take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: acmearea: error handlingarea: ui / uxneeds-updatepriority: significant

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions