From 0c61cb06040002470bd8137a3622806253b98c69 Mon Sep 17 00:00:00 2001 From: Kevin Wang Date: Fri, 17 Dec 2021 23:56:23 -0500 Subject: [PATCH] fix: unnecessary exception throwing --- functions/src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/functions/src/index.ts b/functions/src/index.ts index babc82bc8..ed5d91739 100644 --- a/functions/src/index.ts +++ b/functions/src/index.ts @@ -316,8 +316,9 @@ export const getProfilePicture = functions.https.onRequest(async (req, res) => { console.error(err); throw new functions.https.HttpsError("not-found", "image not found"); } + default: + throw new functions.https.HttpsError("invalid-argument", "invalid provider"); } - throw new functions.https.HttpsError("invalid-argument", "invalid provider"); }); export const getUserEmotes = functions.https.onCall(async (data, context) => {