§1550
Sacraments › … › II. The Sacrament of Holy Orders in the Economy of Salvation
Two participations in the one priesthood of Christ
This presence of Christ in the minister is not to be understood as if the latter were preserved from all human weaknesses, the spirit of domination, error, even sin. The power of the Holy Spirit does not guarantee all acts of ministers in the same way. While this guarantee extends to the sacraments, so that even the minister's sin cannot impede the fruit of grace, in many other acts the minister leaves human traces that are not always signs of fidelity to the Gospel and consequently can harm the apostolic fruitfulness of the Church.
Source: Catechism of the Catholic Church (Vatican.va)