From 6f0e0b94084f936fbcc170f0b22a3b0231eef871 Mon Sep 17 00:00:00 2001
From: Dominik George <dominik.george@teckids.org>
Date: Fri, 9 Oct 2020 17:02:03 +0200
Subject: [PATCH] Fix variable

---
 bigbluebutton/api/bigbluebutton.py | 4 ++--
 pyproject.toml                     | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/bigbluebutton/api/bigbluebutton.py b/bigbluebutton/api/bigbluebutton.py
index 00f870c..0ea46ab 100644
--- a/bigbluebutton/api/bigbluebutton.py
+++ b/bigbluebutton/api/bigbluebutton.py
@@ -148,8 +148,8 @@ class BigBlueButton:
             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")
+            message_key = xml.get("messageKey", "")
+            message = xml.get("message", "Unknown error")
 
             ex = BigBlueButtonError(f"Backend returned FAILED response: {message}")
             ex.message_key = message_key
diff --git a/pyproject.toml b/pyproject.toml
index e9195e9..3c79c37 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "bigbluebutton2"
-version = "0.1a4"
+version = "0.1a5"
 description = "Sophisticated Python client library for BigBlueButtonâ„¢ with Django integration"
 authors = ["Dominik George <dominik.george@teckids.org>", "Tom Teichler <tom.teichler@teckids.org"]
 license = "MIT"
-- 
GitLab