I would have an honest conversation with your manager about the meeting that you had with the manager's manager.
Be plain and tell them that it made you uncomfortable and confused given your contributions to the project and the fact that you hadn't heard any negative feedback prior. Their response could be one of many. They could say that the boss is an asshole and just overreacted. They could say, "Actually, they were right. We've been disappointed with this project and think you could have done better."
If the response is the latter, it then really opens a whole other can of worms because if they have been disappointed with your performance all along, why are you just learning about it now?
Managers have responsibilities to their direct reports, especially junior devs to provide ongoing feedback and guidance. If that hasn't happened in this case and the project is considered a failure, that is a major problem.
I also think it's possible that your manager's manager is uncomfortable being direct with your manager. So instead of having a candid conversation with them, they used you as an emotional punching bag as a way to air their grievances. Which is totally inappropriate and nothing you should take personally, but is also something that should be considered a red flag to working for/with these people.
This. You manager was expecting negative feedback and left you holding the bag. She should know that you know, and that you were a good sport this time, and that going forward you would really appreciate to be on the same page. Otherwise it's a toxic environment and a huge red flag.
Maybe the programming world is different but in any corporation there must be a frank, honest, exchange of info and discussion (not necessarily agreement) with your immediate manager/supervisor, it is their responsability to give you directives and if not fully protect, at least shield you from the higher in grade (or on the contrary tell you what your mistakes are, not let someone else in a higher position do that).
That's a terrible advice. Smart people avoid entangling their emotions into their work.
If somebody is pissed at you at work, filter information out of it, discard all emotions, from information discard all information that is not actionable for you then move on.
Don't engage into emotional layer, don't seek emotional allies. Don't expect people will behave in just and responsible manner. It should be sufficient if they are predictable. People never change, they just become more so.
Be plain and tell them that it made you uncomfortable and confused given your contributions to the project and the fact that you hadn't heard any negative feedback prior. Their response could be one of many. They could say that the boss is an asshole and just overreacted. They could say, "Actually, they were right. We've been disappointed with this project and think you could have done better."
If the response is the latter, it then really opens a whole other can of worms because if they have been disappointed with your performance all along, why are you just learning about it now?
Managers have responsibilities to their direct reports, especially junior devs to provide ongoing feedback and guidance. If that hasn't happened in this case and the project is considered a failure, that is a major problem.
I also think it's possible that your manager's manager is uncomfortable being direct with your manager. So instead of having a candid conversation with them, they used you as an emotional punching bag as a way to air their grievances. Which is totally inappropriate and nothing you should take personally, but is also something that should be considered a red flag to working for/with these people.