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): ...@@ -70,9 +70,10 @@ class ClientErrorException(CaosDBException):
class ServerErrorException(CaosDBException): class ServerErrorException(CaosDBException):
def __init__(self, body): def __init__(self, body):
xml = etree.fromstring(body) xml = etree.fromstring(body)
msg = xml[0].get("description") error = xml.xpath('/Response/Error')[0]
if xml[0].text is not None: msg = error.get("description")
msg = msg + "\n\n" + xml[0].text if error.text is not None:
msg = msg + "\n\n" + error.text
CaosDBException.__init__(self, msg) 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