helgeerbe / certbot-dns-ionos

A certbot plugin for enabling DNS authentication with IONOS
Other
39 stars 11 forks source link

Exception while handling ionos API error #24

Closed JulienPalard closed 1 week ago

JulienPalard commented 6 months ago

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

DorianCoding commented 2 weeks ago

Hello,

At least you know your API key is invalid no?

DorianCoding commented 1 week ago

Hello,

I think it is more clear now, can you tell me?

helgeerbe commented 1 week ago

Should be fixed with 2024.10.19