Throw an error when decoding invalid text