title: Fatal error: Uncaught no such id - API response(PHP)
body: <p>I am trying to get all infos from an API, where I dont know every single ID the API can get me. So basically I am calling for 1 info after another while I increase the ID:</p>
  
  <pre><code>&lt;?php
  
  $i = 0;
  while ($i &lt; 1000)
  {
      if ($api-&gt;traits()-&gt;get($i) == "Uncaught no such id")
      {
          echo "do something";
          $i++;
      }
      else
      {
          echo "do something else";
          $i++;
      }
  }
  </code></pre>
  
  <p>My error code:</p>
  
  <blockquote>
    <p>Fatal error: Uncaught no such id (status: 404; url:....)</p>
  </blockquote>
  
  <p>Is there a way that the program doesn't stop on a Fatal error? Or that it reboot the script on fatal error with one higher ID?</p>