I don't necessarily want to play favorites here and give short shrift to the novel, but a great ending is more important for a short story. Good endings are needed for novels--you can think of a novel as a large ocean liner being brought into port. The ship has been out at sea for days and it's been a fun trip, and you certainly don't want to ruin it at the end by crashing and sinking the ship as it's being brought into the harbor. As long as most folks leave the ship happy, good job! And so with a novel, it's the journey that matters most, although a stunning and startling ending certainly doesn't hurt.
Short stories are different. The reader needs a great ending for the story to be worth their time.
So what makes a great ending? It depends on the genre.
For mysteries, all the elements to solve the mystery have to be present so the reader has a fair chance to solve it, yet doesn't, but still ends up admiring the solution and not feeling cheated.
For crime fiction (and other genres as well), the endings I strive for are ones that changes everything the reader believed he or she knew about the story and does so in a way that makes perfect sense. It will leave the reader gobsmacked.