certbot-dns-ionos
certbot-dns-ionos copied to clipboard
Exception while handling ionos API error
In dns_ionos.py line 125 there's:
if resp.status_code != 200:
content = json.loads(resp.content)[0] # on error content is array with 1 element
But I got a IONOS API answer with no array, just a message, like this:
{"message":"Missing or invalid API key."}
Maybe just using error_msg = resp.reason + " " + resp.text
would be more robust? I won't care reading a bit of json in my logs :D