def __init__(self, url, file_data=None):
        super(JsonResult, self).__init__(url, file_data)
        js = self._json_struct
        if 'error' in js:
            detailstring = ", ".join(js['error'].get('details', []))
            if detailstring:
                detailstring = " -- " + detailstring
            raise ServerError("ERROR %r: %r%s <%s>" % 
                               (js['error']['code'], 
                                js['error']['message'] or 
                                    'Unspecified',
                                detailstring,
                                self.url))
        elif "status" in js:
            if js['status'] == "error":
                raise ServerError(''.join(
                    js.get('messages', 
                           [js.get('message', 
                               'Unspecified Error')])))
dataset/ETHPy150Open jasonbot/arcrest/arcrest/server.py/JsonResult.__init__/original