diff --git a/src/caosdb/exceptions.py b/src/caosdb/exceptions.py
index a5d6e99662c38e6f74e2e974a68ce8152997e271..45c4570b4227031a35a486b86ea65535ff105852 100644
--- a/src/caosdb/exceptions.py
+++ b/src/caosdb/exceptions.py
@@ -70,9 +70,10 @@ class ClientErrorException(CaosDBException):
 class ServerErrorException(CaosDBException):
     def __init__(self, body):
         xml = etree.fromstring(body)
-        msg = xml[0].get("description")
-        if xml[0].text is not None:
-            msg = msg + "\n\n" + xml[0].text
+        error = xml.xpath('/Response/Error')[0]
+        msg = error.get("description")
+        if error.text is not None:
+            msg = msg + "\n\n" + error.text
         CaosDBException.__init__(self, msg)