From 22c2446e88097136436eaf15f419e4b4f19ce1ae Mon Sep 17 00:00:00 2001 From: Kenny Elshoff Date: Thu, 9 Nov 2023 22:25:41 -0500 Subject: [PATCH] fix: throw new error in `fetchInvoiceById` catch block --- dashboard/starter-example/app/lib/data.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/dashboard/starter-example/app/lib/data.ts b/dashboard/starter-example/app/lib/data.ts index c25648f6..c9009d0e 100644 --- a/dashboard/starter-example/app/lib/data.ts +++ b/dashboard/starter-example/app/lib/data.ts @@ -165,6 +165,7 @@ export async function fetchInvoiceById(id: string) { return invoice[0]; } catch (error) { console.error('Database Error:', error); + throw new Error('Failed to fetch invoice.'); } }