My larger failure: I was hired as a contractor/consultant by a major media company earlier this year to help the team develop some cloud based software. I was hired to improve their testing karate. When I started, I was constantly being blocked; all my ideas were rejected and the team kept reverting to they way they had always done it. After 1.5 months the teamleader threw me out. Another team leader was happy take me, there, things were doing great, but I struggled to refactor the mess of TypeScript-AWS-Lambda-Cloud-Crap in a meaningful way.
Not all of it was my fault; the situation there was horrible. But I believe someone more experienced than me, or just someone who doesn't get as emotional as quickly as I do could have handled the situation way better. I feel like a failure.
I am frustrated by the situation, because while it was going on, I felt that I was doing everything right. Not sure what my lesson is.