Thomas Aquinas,
Summa Theologiae — Question 21 - THE JUSTICE AND MERCY OF GOD…
“ I answer that, Mercy and truth are necessarily found in all God's works, if mercy be taken to mean the removal of any kind of defect. Not every defect, however, can properly be called a misery; but only defect in a rational nature whose lot is to be happy; for misery is opposed to happiness. For this necessity there is a reason, because since a debt paid according to the divine justice is one due either to God, or to some creature, neither the one nor the other can be lacking in any work of God: because God can do nothing that is not in accord with His wisdom and goodness ”
