When I first wrote the title to this post, I had the concept of a "What happens when I <insert curse-word> up? How...be...awesome...again?"
However, that's actually a narrow perspective, therefore this post will cover the great eff-ups and successes, and how the author (you/I) should deal with them.
An author can force a story to deteriorate in more ways than should be allowed.
I can pull on that one thread and suddenly I wish I'd left it all alone because now I have one long spaghetti of story. Certainly, you can put it back together...but it may not be easy.
Was that chapter really necessary? What did it do for the character, for the reader?
I spend the entire story building up the character's personality and desires, and I don't want to screw up! Perfection is ideal. Attainable? No.
But, back to that chapter example. There has been at least on time where I wrote an entire chapter that I then threw away. I can divulge this one thing quite easily: it was not enjoyable. I spent a good hour on that thing. Sure, it was the first draft and it wasn't a long chapter, but come on! I wrote the scenes, had some ideas for the next chapter, and then with some thought, I realized it was for naught. Perhaps my whims had caught up with me: I can't write the perfect list of chapters on the first go anymore. Normally, I'll add chapters on later drafts, but remove in the first? That's not how I thought I'd do it.
So, what happens when you screw up? You fix it. In my case, I removed the virus chapter and replenished the story with a better one that gave the story the direction it needed. It was actually surprisingly easy, once I realized I had the second chance. Still, I didn't really plan out the replacement, but I was in high spirits. And I got some comedy out of it...always a good thing.
To summarize: when you make a big mistake, bring out your critical eye and take a sip of I-can-do-better. And perhaps add some sugar. Find a better way. Take your story as a whole and work through it!
Onto the optimistic side:
When I do well I get giddy. Woot I rock at writing! I want a slow-clap. Now.
I got through the tough passage and the character is up against a huge block that they have to surpass. Yeah, it's a good time to be the writer: how will it go down? I just set up the story for that amazing thing? Yeah, I'm awesome.
The gotcha? Don't get complacent. Most likely you're not finished with the draft. If you are, then move to the next draft, else hire an editor.
If you have more writing to do, be happy for what you did, but move on. As most of us know by now, one day you'll feel ravishing about your accomplishment, but the next downright dreadful. Take it in turns and be strong, you Writer.