From 095e8ad459cd124940c11c3aedcccb825b845b12 Mon Sep 17 00:00:00 2001 From: Andymick Date: Sat, 18 Jul 2026 10:08:08 +0100 Subject: [PATCH] Add error handling to checkout page database queries --- src/app/checkout/page.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/checkout/page.tsx b/src/app/checkout/page.tsx index 51b43f4..b694ea0 100644 --- a/src/app/checkout/page.tsx +++ b/src/app/checkout/page.tsx @@ -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 ; }