Added a maximum nr. of errors before the batch fails. If a records causes an error from the server even after retrying, it is logged, but after /max-err errors, we still fail.