From 80fa528a71c9bbdb7a9e786897a375f65ef32e67 Mon Sep 17 00:00:00 2001 From: Zhuk Sergey Date: Thu, 22 Mar 2018 14:14:55 +0300 Subject: [PATCH] Documentation fix Remove word `function` from middleware description --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4d17ebe7..36e1c3b8 100644 --- a/README.md +++ b/README.md @@ -860,7 +860,7 @@ $server = new Server(array( Similarly, you can use the result of the `$next` middleware request handler function to modify the outgoing response. -Note that as per the above documentation, the `$next` function may return a +Note that as per the above documentation, the `$next` middleware request handler may return a `ResponseInterface` directly or one wrapped in a promise for deferred resolution. In order to simplify handling both paths, you can simply wrap this in a @@ -880,7 +880,7 @@ $server = new Server(array( )); ``` -Note that the `$next` middleware request handler function may also throw an +Note that the `$next` middleware request handler may also throw an `Exception` (or return a rejected promise) as described above. The previous example does not catch any exceptions and would thus signal an error condition to the `Server`.