title: Laravel - Can't handle RequestException (Guzzle + MailChimp)
body: <p>I'm trying to handle a 404 request exception. It's the first time I'm using Guzzle so I'm unable to handle the exception without the error promps first, I need to check the error code because on the mailchimp API its the error code that gives us the informations we need.</p>
  
  <p>Instead i'm getting this in response - <a href="http://prntscr.com/db9ari" rel="nofollow noreferrer">http://prntscr.com/db9ari</a></p>
  
  <pre><code>namespace App\Http\Controllers;
  
  use Illuminate\Http\Request;
  use App\Newsletter;
  use GuzzleHttp\Client;
  
  class NewsletterController extends Controller
  {
  
  
      public function api()
      {
  
          $mailchimp = new Client(['base_uri' =&gt; 'https://us14.api.mailchimp.com/3.0/']);
  
          try {
              $checkEmail = $mailchimp-&gt;request('GET', 'lists/LIST-ID/members/' . md5('EMAIL), [ 'headers' =&gt; [ 'Authorization' =&gt; 'apikey ' . config('globals.mailchimp_key') ]]);
          }
  
          catch( RequestException $exception ) {
  
              if ($exception-&gt;getStatusCode() === 404)
              {
                  return 'STRING THAT I WANT TO RETURN IN CASE OF ERROR';
              }
          }
  
  
  
      }
  }
  </code></pre>