title: Why I get Fatal error: Uncaught exception 'GuzzleHttp\Exception\ClientException' with message 'Client error: 404'?
body: <p>I try catch exception, but i still get "Fatal error: Uncaught exception 'GuzzleHttp\Exception\ClientException' with message 'Client error: 404' in C:\OS\OpenServer\domains\kinopoisk\parser\php\vendor\guzzlehttp\guzzle\src\Middleware.php:69"</p>
  
  <pre><code> &lt;?php
  
      ini_set('display_errors', 'on');
      error_reporting(E_ALL);
      set_time_limit(0);
  
      require "vendor/autoload.php";
  
      use GuzzleHttp\Client;
      use Psr\Http\Message\ResponseInterface;
      use GuzzleHttp\Exception\RequestException;
      use GuzzleHttp\Exception\ClientException;
  
      $filmsUrl = [297, 298];
  
      $urlIterator = new ArrayObject($filmsUrl);
  
      $client = new Client([
          'base_uri' =&gt; 'http://example.com',
          'cookies' =&gt; true,
      ]);
  
      foreach ($urlIterator-&gt;getIterator() as $key =&gt; $value) {
          try {
              $promise = $client-&gt;requestAsync('GET', 'post/' . $value, [
                  'proxy' =&gt; [
                      'http'  =&gt; 'tcp://216.190.97.3:3128'
                  ]
              ]);
  
              $promise-&gt;then(
                  function (ResponseInterface $res) {
                      echo $res-&gt;getStatusCode() . "\n";
                  },
                  function (RequestException $e) {
                      echo $e-&gt;getMessage() . "\n";
                      echo $e-&gt;getRequest()-&gt;getMethod();
                  }
              );
          } catch (ClientException $e) {
              echo $e-&gt;getMessage() . "\n";
              echo $e-&gt;getRequest()-&gt;getMethod();
          }
      }
      $promise-&gt;wait();
  </code></pre>
  
  <p>What wrong in my code?</p>