Add functionality to calculate errors excluding apex