It seems you are probably talking about having a problem at the TSA document check just before security screening - is that correct? Or are you talking about at checkin with the airline, in which case, did the two problems happen with the same airline or different airlines? What country issued the passports?
It seems unlikely to me that the passports themselves are "defective" and need to be replaced. Rather, it seems more likely that it was a communication issue with the database the passports were checked against.