Parameterize max errors for clear container