When does a person commit the sin of rash judgment? A person commits the sin of rash judgment when, without sufficient reason, he believes something harmful to another's character.
Before thou inquire, blame no man. (Ecclesiasticus 11:7)
When does a person commit the sin of detraction? A person commits the sin of detraction when, without a good reason, he makes known the hidden faults of another.
A good name is better than great riches, and good favor is above silver and gold. (Proverbs 22:1)
More on that here -> CCC 2475-2487