Skip to content
Snippets Groups Projects
Verified Commit 79f5afae authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Raise proper exception, and early, if XML parsing fails

parent 65e2d5ec
No related branches found
No related tags found
1 merge request!39Resolve "Handle return codes and messages"
...@@ -142,7 +142,10 @@ class BigBlueButton: ...@@ -142,7 +142,10 @@ class BigBlueButton:
if res.status_code != 200: if res.status_code != 200:
raise BigBlueButtonError(f"Backend returned HTTP status {res.status_code}.") raise BigBlueButtonError(f"Backend returned HTTP status {res.status_code}.")
xml = xmltodict.parse(res.text) try:
xml = xmltodict.parse(res.text)
except Exception as ex:
raise BigBlueButtonError("Failed to parse XML response from backend.") from ex
return xml["response"] return xml["response"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment