Show error detail to the user.

Previously this code would show the user a hardcoded message based on the error
type, but it's much more useful to show the error detail field, which often
helps debug the problem.
This commit is contained in:
Jacob Hoffman-Andrews
2016-01-05 10:51:59 -08:00
parent be4d56c353
commit f7fad9a4af
2 changed files with 2 additions and 7 deletions
+1 -6
View File
@@ -543,13 +543,8 @@ def _generate_failed_chall_msg(failed_achalls):
msg = [
"The following '{0}' errors were reported by the server:".format(typ)]
problems = dict()
for achall in failed_achalls:
problems.setdefault(achall.error.description, set()).add(achall.domain)
for problem in problems:
msg.append("\n\nDomains: ")
msg.append(", ".join(sorted(problems[problem])))
msg.append("\nError: {0}".format(problem))
msg.append("\n\nDomain: %s\nDetail: %s\n" % (achall.domain, achall.error.detail))
if typ in _ERROR_HELP:
msg.append("\n\n")