def check_response(func):
    """
    Decorator checking first REST response.
    :return:
    """
    def _decorator(self, *args, **kwargs):
        try:
            response = func(self, *args, **kwargs)
        except ServerNotFoundError as e:
            raise OperationRetry(
                    'Warning: {0}. '
                    'If problem persists, error may be fatal.'.format(
                        e.message))
        if 'error' in response:
            self.logger.error('Response with error {0}'
                              .format(response['error']))

            raise GCPError(response['error'])
        return response
    return wraps(func)(_decorator)