errors check handles multiple errors