Add error handling to checkout page database queries

This commit is contained in:
Andymick
2026-07-18 10:08:08 +01:00
parent f6c464372f
commit 095e8ad459
+6 -1
View File
@@ -2,7 +2,12 @@ import { getCurrentCustomer } from '@/lib/auth';
import CheckoutPageClient from './client';
export default async function CheckoutPage() {
const customer = await getCurrentCustomer();
let customer = null;
try {
customer = await getCurrentCustomer();
} catch (err) {
console.error('Error fetching customer for checkout:', err);
}
return <CheckoutPageClient isLoggedIn={!!customer} customer={customer} />;
}