mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
autodns: proper error management for authentication error
This commit is contained in:
parent
c8caabf8f8
commit
68f2eea0ae
2 changed files with 6 additions and 1 deletions
|
@ -319,6 +319,7 @@
|
|||
"domain_uninstall_app_first": "Those applications are still installed on your domain:\n{apps}\n\nPlease uninstall them using 'yunohost app remove the_app_id' or move them to another domain using 'yunohost app change-url the_app_id' before proceeding to domain removal",
|
||||
"domain_registrar_is_not_configured": "The registrar is not yet configured for domain {domain}.",
|
||||
"domain_dns_push_not_applicable": "The DNS push feature is not applicable to domain {domain}",
|
||||
"domain_dns_push_failed_to_authenticate": "Failed to authenticate on registrar's API. Most probably the credentials are incorrect? (Error: {error})",
|
||||
"domain_config_mail_in": "Incoming emails",
|
||||
"domain_config_mail_out": "Outgoing emails",
|
||||
"domain_config_xmpp": "XMPP",
|
||||
|
|
|
@ -605,7 +605,11 @@ def domain_dns_push(operation_logger, domain, dry_run=False, force=False, purge=
|
|||
.with_dict(dict_object={"action": "list", "type": "all"})
|
||||
)
|
||||
client = LexiconClient(query)
|
||||
try:
|
||||
client.provider.authenticate()
|
||||
except Exception as e:
|
||||
raise YunohostValidationError("domain_dns_push_failed_to_authenticate", error=str(e))
|
||||
|
||||
try:
|
||||
current_records = client.provider.list_records()
|
||||
except Exception as e:
|
||||
|
|
Loading…
Add table
Reference in a new issue