error handling for empty or malformed data.event