'Evaluates response before passing result to invoker.'

def _eval_response(self, response):

    status_code = int(response.status_code)
    if (status_code >= 300):
        if (status_code == 422):
            msg = (_('Response    error    -    %s.') % response.text)
            json_response = response.json()
            if (json_response is not None):
                ret_code = json_response.get('retcode', '')
                if ((ret_code == '30') or (ret_code == 'authFailPassword')):
                    msg = (_('The    storage    array    password    for    %s    is    incorrect,    please    update    the    configured    password.') % self._system_id)
        elif (status_code == 424):
            msg = _('Response    error    -    The    storage-system    is    offline.')
        else:
            msg = (_('Response    error    code    -    %s.') % status_code)
        raise es_exception.WebServiceException(msg, status_code=status_code)
