Completely agree. As a general rule if a junior developer does something “wrong”, unless it purposefully malicious, it’s on the manager.
OP, I’d say keep this situation in the back of your mind and reevaluate in a few months. If it happens again, start the job search.