We say that a code detects errors if, whenever up to errors occur in the transmission of any codeword, then we receive an invalid codeword (that is, we know from that the transmission was faulty).