title: Firebase Cloud Functions - Throw Auth Error
body: <p>Is it possible to throw an Auth Error from HTTPs callble functions?</p>
  <p>I mean, instead of this</p>
  <pre><code> if (err.code === &quot;auth/email-already-exists&quot;) {
      throw new functions.https.HttpsError(
        &quot;invalid-argument&quot;,
        &quot;The email address is already in use by other account&quot;
      );
    }
  </code></pre>
  <p>something like</p>
  <pre><code>exports.signUp = functions
    .region(&quot;us-central1&quot;)
    .runWith({ memory: &quot;2GB&quot;, timeoutSeconds: 120 })
     .https.onCall(async (data, context) =&gt; {
        ...
  
        if (err.code === &quot;auth/email-already-exists&quot;) {
          throw err;
        }
  
        ...
     }
  </code></pre>