It is very hard to do good code review. The reviewer is always missing context. It's easy to overly focus on style nits and not meaningful changes. This is exacerbated when PRs include a large number of changes.
Additionally, code review is the worst time to question decisions made by the developer. You have probably put a lot of work into your changes. Someone callously tossing a "why don't you do it this other way" into your PR feels like bullshit because it is. And again, larger PRs are going to have more (and lower quality) comments, which makes it easy to feel criticized or defensive. The parts you had the most trouble with are likely the parts that people are going to comment on most.
The solution to both of these is to try and break your work into the smallest chunks you can. This makes it easy to catch your own mistakes, as well as reducing the mental burden on the code reviewer. It gives you a chance to validate your strategy before you implement the whole thing. I've never been on a team that pushed back against the idea of splitting a large task into smaller ones.
As to when you do get called out on a mistake, it's ok to feel bad but recognize, people make mistakes. The person did you a favor by finding it in review vs finding out when bug reports start coming in. If it's a good catch, respond by saying "thanks for catching it." Nobody knows everything, nobody writes perfect code.
Additionally, code review is the worst time to question decisions made by the developer. You have probably put a lot of work into your changes. Someone callously tossing a "why don't you do it this other way" into your PR feels like bullshit because it is. And again, larger PRs are going to have more (and lower quality) comments, which makes it easy to feel criticized or defensive. The parts you had the most trouble with are likely the parts that people are going to comment on most.
The solution to both of these is to try and break your work into the smallest chunks you can. This makes it easy to catch your own mistakes, as well as reducing the mental burden on the code reviewer. It gives you a chance to validate your strategy before you implement the whole thing. I've never been on a team that pushed back against the idea of splitting a large task into smaller ones.
As to when you do get called out on a mistake, it's ok to feel bad but recognize, people make mistakes. The person did you a favor by finding it in review vs finding out when bug reports start coming in. If it's a good catch, respond by saying "thanks for catching it." Nobody knows everything, nobody writes perfect code.