Does anybody know how to handle bad data that goes...
# troubleshooting
d
Does anybody know how to handle bad data that goes into the deserializer? We're currently using the Kafka source with the built in JSON deserializer but we want to make sure we're appropriately handling non json records that get added to the topic.
I was able to solve this by creating a wrapper class that extended the Serialization schema but would handle an exception called to derserialize.
Copy code
@Override
    public ObjectNode deserialize(ConsumerRecordbyte[], byte[] record) throws Exception {
        try{
            return super.deserialize(record);
        }catch(Exception e){
            ...
        }
    }