Failure happens all the time. It happens every day in practice. What makes you better is how you react to it.
I like to create imaginary characters and events around a real historical situation. I want readers to feel: OK, this probably didn't happen, but it might have.

