diff --git a/bigbluebutton/api/bigbluebutton.py b/bigbluebutton/api/bigbluebutton.py index e4495e4ecbc516235822fcb99af53f9215e6b96b..aec5215be2adc7956eb88177a287afa4d0ff1323 100644 --- a/bigbluebutton/api/bigbluebutton.py +++ b/bigbluebutton/api/bigbluebutton.py @@ -37,6 +37,11 @@ except ImportError: # pragma: no cover logger = logging.getLogger(__name__) +class BigBlueButtonError(Exception): + """Exception raised when a BigBlueButton backends encounters an error.""" + pass + + @dataclass class BigBlueButton: """One BigBlueButton server. @@ -134,6 +139,9 @@ class BigBlueButton: url = self._build_url(call, params) res = self._session.get(url, timeout=self.request_timeout) + if res.status_code != 200: + raise BigBlueButtonError(f"Backend returned HTTP status {res.status_code}.") + xml = xmltodict.parse(res.text) return xml["response"]