I'd been assigned a medium complexity task and I've failed to accomplish it, the code was all filled with hardcoded values, wrong structure, difficult to debug bugs and similar things.
I've realized I'm not a senior software engineer as I thought and now I don't know what to do next. If you read my resume it'll seem I am a senior but I don't really know where to place me in the "experience" spectrum. I've always managed to solve the problems in front of me but in a "hacky way" and now the issue was totally revealed to me.
I'm thinking about looking for semi senior roles but I'm afraid it'll look weird for the company interviewing me to hire a semi senior with +10 years of experience.
I've also thought about transitioning to a PM role but I'm not sure if I can be a PM if I'm not able to code things the right way myself.
A third option would be to take a break from work and try to learn to write good code but I'm not sure it's possible without working on a company with other people.
As you very probably see, I'm quite lost right now so I'd be very grateful if you can advise me what I could do next with my career.