Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

478
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda