Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

474
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda