def _generate_failed_chall_msg(failed_achalls):
 error = failed_achalls[0].error
 typ = error.typ
 if messages.is_acme_error(error):
  typ = error.code
 msg = ['The following errors were reported by the server:']
 for achall in failed_achalls:
  msg.append(('\n\nDomain: %s\nType:   %s\nDetail: %s' % (achall.domain, typ, achall.error.detail)))
 if (typ in _ERROR_HELP):
  msg.append('\n\n')
  msg.append(_ERROR_HELP[typ])
 return ''.join(msg)

def _generate_failed_chall_msg ( failed_achalls ) : error = failed_achalls [ 0 ] . error typ = error . typ if messages . is_acme_error ( error ) : typ = error . code msg = [ 'The following errors were reported by the server:' ] for achall in failed_achalls : msg . append ( ( '\n\nDomain: %s\nType:   %s\nDetail: %s' % ( achall . domain , typ , achall . error . detail ) ) ) if ( typ in _ERROR_HELP ) : msg . append ( '\n\n' ) msg . append ( _ERROR_HELP [ typ ] ) return '' . join ( msg )
creates a user friendly error message about failed challenges .