Put it at the peak of a fail edit, just after the mistake is clear, then follow it with a funny laugh before the next scene. For a drier ending, pair it with a ba dum tss drum sting after the laugh so the moment closes like a joke.