I'm currently editing and polishing a novel I've left alone for several months. Picking it up again, I was able to read it in a new light and found a better way to tell the story. Now that I've ended up with a version that I'm pleased with, I'm left with just one question. The ending of the story is not particularly happy. My main character is imprisoned in exchange for his friends to escape. However, the main character does outwit the villains in a twist that's revealed at the end of the book. My question is what you all personally feel about the ending of a story? When creating a plot is it practical to incorporate a not-so-happy ending? Does the success of such an ending depend on whether there's something the reader can feel good about?