private static function errorView(
        $errors,
        $code = 400,
        $params = null,
        $method = null,
        $headers = null,
        $exception = null
    ) {
        if (!headers_sent()) {
            http_response_code($code);
        }

        self::view((object)[
            'errors' => $errors
        ]);

        self::$stepCallback->call(
            StepCallback::STEP_ERROR,
            $params,
            $method,
            $headers,
            [$errors, $code, $exception]
        );
    }