'This method throw an Exception if server return a
error message
:return:'

@staticmethod
def raise_on_fail_response(json_response):

    if (json_response is None):
        pass
    error_name = json_response.get(u'error', None)
    error_code = json_response.get(u'code', None)
    if (error_name is not None):
        raise ApiError(error_code, error_name)
