Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

473
Views
Firebase function, error is not being catched

I have the following function in firebase:

exports.findUserInAuth = functions.https.onCall(async (data) => {

  let value = data.value;

  try {
    return await admin.auth().getUserByEmail(value);
  } catch (error) {
    throw new functions.https.HttpsError(error.code, error.message);
  }
  
});

In firebase functions logs I get:

findUserInAuth
Unhandled error Error: Unknown error code: auth/user-not-found. at new HttpsError (/workspace/node_modules/firebase-functions/lib/common/providers/https.js:69:19) at /workspace/index.js:22:13 at processTicksAndRejections (internal/process/task_queues.js:97:5)

As I understand I am catching the error correctly. On my client side I get the following error:

functions/internal
INTERNAL

According to documentation "If an error other than HttpsError is thrown from your functions, your client instead receives an error with the message INTERNAL and the code internal."

Any ideas?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!