    protected function haltHttp($errorInfo = [])
    {
        switch ($errorInfo['code']) {
            case 404:
                $statusCode = 404; //not found
                $title = 'Resource not found';
                break;
            case 500: //application
            case 0: //default
            default:
                $statusCode = 500;
                $title = 'Boo boo';
                break;
        }

        $output = '<!doctype html>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Oups</title>
    <style>
    * {background: #f2dede; color: #a94442; overflow-wrap: break-word;}
    .i {margin-left: auto; margin-right: auto; text-align: center; width: auto;}
    small {font-size: 0.8em;}
    </style>
</head>
<body><div class="i"><br>' .
        "<h1>{$title}</h1>";
        if (Environment::ENV_DEV == $this->config()->getEnv()) {
            $output .= sprintf(
                '<p><i>%s</i></p><p>%s:%s</p>',
                $errorInfo['message'],
                basename($errorInfo['file']),
                $errorInfo['line']
            );
            if (!empty($errorInfo['trace'])) {
                $output .= "<p>";
                $output .= "<small>";
                foreach ($errorInfo['trace'] as $item) {
                    if (!empty($item['class'])) {
                        $output .= sprintf(
                            '%s%s',
                            $item['class'],
                            $item['type']
                        );
                        $output .= "";
                    }
                    if (!empty($item['function'])) {
                        $output .= sprintf(
                            '%s',
                            $item['function']
                        );
                        $output .= "";
                    }
                    if (!empty($item['file'])) {
                        $output .= sprintf(
                            ' [%s:%s]',
                            basename($item['file']),
                            $item['line']
                        );
                        $output .= " ";
                    }
                    $output .= "<br>";
                }
                $output .= "</small></p>";
            }
        }
        $output .= '</div></body></html>';

        $response = new \WebServCo\Framework\Http\Response(
            $output,
            $statusCode,
            ['Content-Type' => 'text/html']
        );
        $response->send();
        return true;
    }