diff --git a/docs/error_handling.html b/docs/error_handling.html
index 9a60d3a..6813971 100644
--- a/docs/error_handling.html
+++ b/docs/error_handling.html
@@ -122,7 +122,10 @@
Module pyControl4.error_handling
elif await __checkResponseFormat(response_text) == "XML":
dictionary = xmltodict.parse(response_text)
if "C4ErrorResponse" in dictionary:
- if dictionary["C4ErrorResponse"]["details"] in ERROR_DETAILS:
+ if (
+ "details" in dictionary["C4ErrorResponse"]
+ and dictionary["C4ErrorResponse"]["details"] in ERROR_DETAILS
+ ):
exception = ERROR_DETAILS.get(dictionary["C4ErrorResponse"]["details"])
raise exception(response_text)
else:
@@ -131,14 +134,14 @@ Module pyControl4.error_handling
)
raise exception(response_text)
elif "code" in dictionary:
- if dictionary["details"] in ERROR_DETAILS:
+ if "details" in dictionary and dictionary["details"] in ERROR_DETAILS:
exception = ERROR_DETAILS.get(dictionary["details"])
raise exception(response_text)
else:
exception = ERROR_CODES.get(str(dictionary["code"]), C4Exception)
raise exception(response_text)
elif "error" in dictionary:
- if dictionary["details"] in DIRECTOR_ERROR_DETAILS:
+ if "details" in dictionary and dictionary["details"] in DIRECTOR_ERROR_DETAILS:
exception = DIRECTOR_ERROR_DETAILS.get(dictionary["details"])
raise exception(response_text)
else:
@@ -175,7 +178,10 @@ Parameters
elif await __checkResponseFormat(response_text) == "XML":
dictionary = xmltodict.parse(response_text)
if "C4ErrorResponse" in dictionary:
- if dictionary["C4ErrorResponse"]["details"] in ERROR_DETAILS:
+ if (
+ "details" in dictionary["C4ErrorResponse"]
+ and dictionary["C4ErrorResponse"]["details"] in ERROR_DETAILS
+ ):
exception = ERROR_DETAILS.get(dictionary["C4ErrorResponse"]["details"])
raise exception(response_text)
else:
@@ -184,14 +190,14 @@ Parameters
)
raise exception(response_text)
elif "code" in dictionary:
- if dictionary["details"] in ERROR_DETAILS:
+ if "details" in dictionary and dictionary["details"] in ERROR_DETAILS:
exception = ERROR_DETAILS.get(dictionary["details"])
raise exception(response_text)
else:
exception = ERROR_CODES.get(str(dictionary["code"]), C4Exception)
raise exception(response_text)
elif "error" in dictionary:
- if dictionary["details"] in DIRECTOR_ERROR_DETAILS:
+ if "details" in dictionary and dictionary["details"] in DIRECTOR_ERROR_DETAILS:
exception = DIRECTOR_ERROR_DETAILS.get(dictionary["details"])
raise exception(response_text)
else: