logger = $logger; $this->formatter = $formatter; } public function handle(Throwable $throwable, ResponseInterface $response) { $stream = new SwooleStream((string) $throwable->getMessage()); return $response->withBody($stream); } public function isValid(Throwable $throwable): bool { return true; } }