A NAND flash sector suddenly goes bad. What happens to the file using that sector?
Information is typically written to flash memories using forward error correcting codes; in addition to the 2048 bits that make up the data for a sector, some additional "ECC" bit values will be computed based upon the contents of those 2048 bits.  When a sector is read, those ECC bit values will be computed again and compared with the values that were stored previously.  If they don't match, that would imply that one or more bits have changed between the time the data was written and the time it was read back.  If only a small number of bits has changed, it may be possible to infer what the correct data should have been.

Note that at the raw hardware level, if a device stores four bits per cell, anything which corrupts one bit within a cell may be likely to corrupt others, but individual memory cells are essentially independent.  Consequently, it may be much more likely that one or two independent memory cells would go bad than that more than four would go bad.  If an error-correcting code is designed so that more than four memory cells would have to prevent perfect recovery of the stored data, a chip would be much more likely to discover that a sector is going bad without losing data, than to lose data because a sector went bad.

One nasty little caveat with this, however, is that many memory chips implement their own error correcting codes internally in addition to whatever is implemented in the controller outside.  Depending upon how those codes are implemented, they may prevent the controller from discovering that memory cells are starting to return corrupt data until so many bits have gone bad as to prevent recovery.  I'm don't know of any way to identify flash drives where such a thing would be a problem, however.