Skip to content
Snippets Groups Projects
Unverified Commit efb32b8e authored by Timm Fitschen's avatar Timm Fitschen
Browse files

BUG: parsing server error with userInfo

parent 96639a38
Branches
Tags
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment