Skip to content

fix bug causing a TypeError when the webserver returns a non-json response

Julian Schuh requested to merge fix/error_messages into master

Wenn der Webserver einen nicht-JSON Antwort liefert, erhält man folgenden Fehler:

Traceback (most recent call last):
  File "...", line 113, in <module>
    zones = client.execute_ta([
  File ".../lib/python3.10/site-packages/netdb_client/api31/__init__.py", line 29, in execute_ta
    raise ValueError(f'Request returned unexpected results ({res.status_code}: {res.reason}). Result: \n{pformat(res.json()) if "json" in res.headers["content-type"] else res.text()}')
TypeError: 'str' object is not callable

Merge request reports

Loading