From f32190139b86c415de6449d0eacebd2a616b3e28 Mon Sep 17 00:00:00 2001 From: helgeerbe Date: Thu, 7 Oct 2021 10:35:45 +0200 Subject: [PATCH] on error response content is array with 1 element --- certbot_dns_ionos/dns_ionos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/certbot_dns_ionos/dns_ionos.py b/certbot_dns_ionos/dns_ionos.py index a1c2dc0..2574c89 100644 --- a/certbot_dns_ionos/dns_ionos.py +++ b/certbot_dns_ionos/dns_ionos.py @@ -127,7 +127,7 @@ class _ionosClient(object): ) logger.debug("API REquest to URL: %s", url) if resp.status_code != 200: - content = json.loads(resp.content) + content = json.loads(resp.content)[0] # on error content is array with 1 element error_msg = resp.reason + " " + content['message'] raise errors.PluginError( "HTTP Error during request {0}:{1}".format(resp.status_code, error_msg)