Repository navigation
display acme.Errors less verbosely - #9255
Conversation
|
I also didn't do that in #9233, but might it be a good idea to also add a test for when Also, currently (i.e., in master) the logging function also removes the ACME error "typ", but wouldn't we want this verbosity to exist in the log file? Just in case? Users normally don't go looking in log files, so no harm in extra verbosity there, right? |
I agree. I am relying on implementation of the If it's not there, this should display the raw type. Hopefully it's never the case in practice that Edit: I may have misread, you may have meant a literal unit test. I think
Yep, agreed. Both locations where we use this function already send the full error to the log file. |
Correct, I meant a unit test. I'm not familiair enough with Python unit tests/coverage, but if no such test is required in |
In #9233 we noticed that the way Certbot displays ACME errors is pretty verbose, due to the implementation of
acme.messages.Error.__str__.The idea in this PR is to display the most relevant information about ACME errors, which is the problem
titleanddetail. Both of these come from the ACME server directly and are most likely to contain the most useful information.Failing that, we can fall back to the RFC8555-based interpretation of the error
type, which Certbot implements asdescription. Take note of jsha's comment about Certbot's implementation ofdescriptionhere: #6392 (comment).If there is no
description, we fall back to thetypeon its own.Overall I hope this is friendlier than a very long line of redundant information. In practice I think this is going to depend on how well written the
detailfield coming from CAs is.Possibly we can continue to always show the
type, maybe without the ACME prefix. I chose not to, but open to other opinions.cc @osirisinferi
Currently master looks something like:
This PR shrinks it down to the following (the ACME server just sends
detailin this case):