diff --git a/bigbluebutton/api/bigbluebutton.py b/bigbluebutton/api/bigbluebutton.py index 94e5f569fb9025f3b761865bb2cab35bbea4556d..00f870c39da7236d59bd243a4c569aa68da23f55 100644 --- a/bigbluebutton/api/bigbluebutton.py +++ b/bigbluebutton/api/bigbluebutton.py @@ -147,6 +147,14 @@ class BigBlueButton: except Exception as ex: raise BigBlueButtonError("Failed to parse XML response from backend.") from ex + if xml.get("returncode", "FAILED").upper() == "FAILED": + message_key = res.get("messageKey", "") + message = res.get("message", "Unknown error") + + ex = BigBlueButtonError(f"Backend returned FAILED response: {message}") + ex.message_key = message_key + raise ex + return xml["response"] def create_meeting(self, do_create: bool = True, *args, **kwargs) -> Meeting: