mirror of
https://github.com/vercel/next-learn.git
synced 2026-06-11 09:51:47 +00:00
fix: throw new error in fetchInvoiceById catch block (#423)
Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
This commit is contained in:
@@ -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.');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user