Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 25, 2023
1 parent 77ed792 commit 485ec11
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions docs/error_handling.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ <h1 class="title">Module <code>pyControl4.error_handling</code></h1>
elif await __checkResponseFormat(response_text) == &#34;XML&#34;:
dictionary = xmltodict.parse(response_text)
if &#34;C4ErrorResponse&#34; in dictionary:
if dictionary[&#34;C4ErrorResponse&#34;][&#34;details&#34;] in ERROR_DETAILS:
if (
&#34;details&#34; in dictionary[&#34;C4ErrorResponse&#34;]
and dictionary[&#34;C4ErrorResponse&#34;][&#34;details&#34;] in ERROR_DETAILS
):
exception = ERROR_DETAILS.get(dictionary[&#34;C4ErrorResponse&#34;][&#34;details&#34;])
raise exception(response_text)
else:
Expand All @@ -131,14 +134,14 @@ <h1 class="title">Module <code>pyControl4.error_handling</code></h1>
)
raise exception(response_text)
elif &#34;code&#34; in dictionary:
if dictionary[&#34;details&#34;] in ERROR_DETAILS:
if &#34;details&#34; in dictionary and dictionary[&#34;details&#34;] in ERROR_DETAILS:
exception = ERROR_DETAILS.get(dictionary[&#34;details&#34;])
raise exception(response_text)
else:
exception = ERROR_CODES.get(str(dictionary[&#34;code&#34;]), C4Exception)
raise exception(response_text)
elif &#34;error&#34; in dictionary:
if dictionary[&#34;details&#34;] in DIRECTOR_ERROR_DETAILS:
if &#34;details&#34; in dictionary and dictionary[&#34;details&#34;] in DIRECTOR_ERROR_DETAILS:
exception = DIRECTOR_ERROR_DETAILS.get(dictionary[&#34;details&#34;])
raise exception(response_text)
else:
Expand Down Expand Up @@ -175,7 +178,10 @@ <h2 id="parameters">Parameters</h2>
elif await __checkResponseFormat(response_text) == &#34;XML&#34;:
dictionary = xmltodict.parse(response_text)
if &#34;C4ErrorResponse&#34; in dictionary:
if dictionary[&#34;C4ErrorResponse&#34;][&#34;details&#34;] in ERROR_DETAILS:
if (
&#34;details&#34; in dictionary[&#34;C4ErrorResponse&#34;]
and dictionary[&#34;C4ErrorResponse&#34;][&#34;details&#34;] in ERROR_DETAILS
):
exception = ERROR_DETAILS.get(dictionary[&#34;C4ErrorResponse&#34;][&#34;details&#34;])
raise exception(response_text)
else:
Expand All @@ -184,14 +190,14 @@ <h2 id="parameters">Parameters</h2>
)
raise exception(response_text)
elif &#34;code&#34; in dictionary:
if dictionary[&#34;details&#34;] in ERROR_DETAILS:
if &#34;details&#34; in dictionary and dictionary[&#34;details&#34;] in ERROR_DETAILS:
exception = ERROR_DETAILS.get(dictionary[&#34;details&#34;])
raise exception(response_text)
else:
exception = ERROR_CODES.get(str(dictionary[&#34;code&#34;]), C4Exception)
raise exception(response_text)
elif &#34;error&#34; in dictionary:
if dictionary[&#34;details&#34;] in DIRECTOR_ERROR_DETAILS:
if &#34;details&#34; in dictionary and dictionary[&#34;details&#34;] in DIRECTOR_ERROR_DETAILS:
exception = DIRECTOR_ERROR_DETAILS.get(dictionary[&#34;details&#34;])
raise exception(response_text)
else:
Expand Down

0 comments on commit 485ec11

Please sign in to comment.