Chapter 13 - Handle specific error (not found in this case)

This commit is contained in:
2024-01-03 09:47:57 +01:00
parent f3626ec7c0
commit 1c23830272
3 changed files with 24 additions and 0 deletions

View File

@@ -169,6 +169,7 @@ export async function fetchInvoiceById(id: string) {
amount: invoice.amount / 100,
}));
console.log(invoice);
return invoice[0];
} catch (error) {
console.error('Database Error:', error);