From c8398b19f39386dc3496440e7694535129aa245e Mon Sep 17 00:00:00 2001 From: Kenny Elshoff Date: Tue, 14 Nov 2023 09:37:37 -0500 Subject: [PATCH] fix: throw new error in `fetchInvoiceById` catch block (#423) Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com> --- 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 391c46e..cf90361 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.'); } }