Exception while handling ionos API error
Closed this issue · 3 comments
JulienPalard commented
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
Hello,
At least you know your API key is invalid no?
DorianCoding commented
Hello,
I think it is more clear now, can you tell me?
helgeerbe commented
Should be fixed with 2024.10.19