protected function getOutputHandler(
        ServerRequestInterface $request,
        ResponseInterface $response,
        \Throwable $e
    ) : Run {
        $whoops = new Run();
        // disable write to output
        $whoops->writeToOutput(false);
        // push handler by Type
        switch ($this->determineOutputType()) {
            case self::TYPE_JSON:
                $whoops->pushHandler([$this, 'renderJson']);
                break;
            case self::TYPE_XML:
                $whoops->pushHandler([$this, 'renderXML']);
                break;
            case self::TYPE_PLAIN:
                $whoops->pushHandler([$this, 'renderPlainText']);
                break;
            default:
                $whoops->pushHandler([$this, 'renderHtml']);
        }

        return $whoops;
    }