However, some people who criticize excessively do it for not entirely altruistic reasons or they lack the emotional intelligence to understand when they are breaching someone's limit of tolerance. Even valid criticism should bear in mind quantity, frequency, and severity of impact on the individual being criticized. I think most people who are being thoughtful in the moment will do this, and try to suss out someone's limits and temperament before unleashing a volley of criticisms, but there are some who use such learning opportunities or their position of authority to vent their sadistic urges, or they simply do not understand healthy boundaries and just criticize relentlessly regardless of impact or effectiveness. I strongly believe that this latter category should not be normalized or accepted.
So you've got to ask yourself, are the people criticizing your code probably doing so with the intention to make you better, or the team better, without undue malice? That's usually the case. Try to focus on their intent to help you do better instead of the disappointment of the criticism itself. But, if you've found yourself in the unfortunate situation of being carpet-bombed with criticism maliciously you don't necessarily just have to put up with that and it would be a good idea to try to find an organization with healthier communication. People who have been in such unhealthy environments before (or had unhealthy family environments) will likely overreact even in healthy environments later, and it can take some time to learn that not everyone is out to get you, they just want you to do better next time.