@@ -67,7 +67,7 @@ Like in case of the ``$next`` callable, you must pass the ``$request`` as the fi
6767 or you will end up in an infinite execution loop.
6868
6969The ``$next `` and ``$first `` callables will return a :doc: `/components/promise `.
70- You can manipulate the ``ResponseInterface `` or the ``Exception `` by using the
70+ You can manipulate the ``Psr\Http\Message\ ResponseInterface `` or the ``Http\Client\ Exception `` by using the
7171``then `` method of the promise::
7272
7373 public function handleRequest(RequestInterface $request, callable $next, callable $first)
@@ -76,7 +76,7 @@ You can manipulate the ``ResponseInterface`` or the ``Exception`` by using the
7676
7777 return $next($request)->then(function (ResponseInterface $response) {
7878 return $response->withHeader('MyResponseHeader', 'value');
79- }, function (Exception $exception) {
79+ }, function (\Http\Client\ Exception $exception) {
8080 echo $exception->getMessage();
8181
8282 throw $exception;
@@ -89,6 +89,11 @@ You can manipulate the ``ResponseInterface`` or the ``Exception`` by using the
8989 PSR _ is released. Once it is out, we will use this PSR in HTTPlug and
9090 deprecate the old contract.
9191
92+ .. warning ::
93+
94+ If a plugin throws an exception that does not implement ``Http\Client\Exception ``
95+ it will break the plugin chain.
96+
9297To better understand the whole process check existing implementations in the
9398`client-common package `_.
9499
0 commit comments