protected function setFinishDataErrors(array &$result, array &$job)
    {
        if (!empty($job['errors'])) {

            if (!empty($job['redirect']['errors'])) {
                $result['redirect'] = $job['redirect']['errors'];
            }

            if (empty($job['redirect_message']['errors'])) {
                $vars = array('%total' => $job['total'], '%errors' => $job['errors']);
                $message = $this->translation->text('Processed %total items, errors: %errors', $vars);
            } else {
                $vars = array('%total' => $job['total'], '%errors' => $job['errors'],
                    '%inserted' => $job['inserted'], '%updated' => $job['updated']);
                $message = $this->translation->text($job['redirect_message']['errors'], $vars);
            }

            $this->session->setMessage($message, 'danger');
        }
    }