added redis_error function