diff --git a/client/src/components/BookingList/BookingCard/BookingCard.tsx b/client/src/components/BookingList/BookingCard/BookingCard.tsx index 60d2ffca26ac011b8384fe4f8c947f6dfcf5b430..774dc95614b8ec8cae317e555cb84c564cd43696 100644 --- a/client/src/components/BookingList/BookingCard/BookingCard.tsx +++ b/client/src/components/BookingList/BookingCard/BookingCard.tsx @@ -28,7 +28,7 @@ function BookingCard({ flight }: IBookingCard) { navigate('/booking/payment-form', { state: { bookingInfo } }); } catch (error) { console.error("Booking failed:", error); - alert("Failed to book flight. Please try again."); + alert("Failed to book flight. Please try again. Error: ${error.message}"); } }; diff --git a/client/src/components/PaymentForm/PaymentForm.tsx b/client/src/components/PaymentForm/PaymentForm.tsx index 9afb97afe2fccbb9991553133d353d1c51cb8db2..64ac254857ba1b73f92687d71f6e22d4973ec76c 100644 --- a/client/src/components/PaymentForm/PaymentForm.tsx +++ b/client/src/components/PaymentForm/PaymentForm.tsx @@ -77,7 +77,7 @@ const PaymentForm = () => { } } catch (error) { console.error('Payment confirmation failed:', error); - setMessage("An error occurred while confirming the payment."); + setMessage("An error occurred while confirming the payment. Error: ${error.message}"); } finally { setLoading(false); }