RUBY-671 Fix to handle when continue_on_error is false and batch insertions should be halted