title: How to catch a frontend call to a non-existing function
body: <p>Is there a way to catch a not existing API call in the Firebase functions?</p>
  <p>I'm trying to handle a situation when the frontend application trying to get a response from a cloud function that doesn't exist.</p>
  <pre><code>http://localhost:5001/&lt;appid&gt;/us-central1/someBadApi
  </code></pre>
  <p>I'm getting a generic response:</p>
  <blockquote>
  <p>Function us-central1-someBadApi does not exist, valid functions are: us-central1-getUserCompleteData, us-central1-getDevices, ...</p>
  </blockquote>
  <p>I would like to intercept such errors on the server side, and return a JSON instead.</p>
  <p>PS: I'm not using express, just functions.https.onRequest functions.</p>