fix error in url
added code for unpacking an exception from the server.  We need to deal with non json objects (e.g. if the server has crashed)
Fiddling around trying to get things to serialize properly