public boolean hasError() {
        return error != null;
    }
Return whether there is an error.

@return whether there is an error
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/mongodb-cdc/src/main/java/org/apache/inlong/sort/cdc/mongodb/debezium/internal/Handover.java