fix: catch only JSON decode errors in error handling
This commit is contained in:
parent
3004791b38
commit
ad07746576
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ class HetznerHandler(Handler):
|
|||
res = ex.fp.read().decode('utf-8')
|
||||
try:
|
||||
raise Exception(json.loads(res)['error'])
|
||||
except Exception:
|
||||
except json.JSONDecodeError:
|
||||
raise Exception(res)
|
||||
|
||||
def create(self, record_name: str, record_value: str) -> None:
|
||||
|
|
Loading…
Reference in a new issue