From 473c69ff5333947d3b93433a9f4833ccade43405 Mon Sep 17 00:00:00 2001 From: kazuwombat Date: Sat, 8 Oct 2022 00:08:23 +0900 Subject: [PATCH] fix(firestore-stripe-invoices):change status to 404 when invoice is not found in firestore on updateInvoice --- firestore-stripe-invoices/functions/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firestore-stripe-invoices/functions/src/index.ts b/firestore-stripe-invoices/functions/src/index.ts index cc8041d3..e79f78f6 100644 --- a/firestore-stripe-invoices/functions/src/index.ts +++ b/firestore-stripe-invoices/functions/src/index.ts @@ -264,7 +264,7 @@ export const updateInvoice = functions.handler.https.onRequest( if (invoicesInFirestore.size !== 1) { logs.unexpectedInvoiceAmount(invoicesInFirestore.size, invoice.id); - resp.status(500).send(`Invoice not found.`); + resp.status(404).send(`Invoice not found.`); return; }