From 25a4eb33a6490f5f2ea6cb1a0dcfcda35dd9a1bf Mon Sep 17 00:00:00 2001 From: "xiemaomao520@163.com" Date: Sun, 22 Jul 2018 00:01:20 +0800 Subject: [PATCH] The `handle` method have a return type of `ResponseInterface`, so it was never be executed. --- src/Middleware/ErrorHandler.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Middleware/ErrorHandler.php b/src/Middleware/ErrorHandler.php index f94c677..5832806 100644 --- a/src/Middleware/ErrorHandler.php +++ b/src/Middleware/ErrorHandler.php @@ -141,10 +141,6 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface try { $response = $handler->handle($request); - - if (! $response instanceof ResponseInterface) { - throw new MissingResponseException('Application did not return a response'); - } } catch (Throwable $e) { $response = $this->handleThrowable($e, $request); }