From 7642edc15458bc31292d47aa00b6618a6b3348ea Mon Sep 17 00:00:00 2001 From: Kirill Date: Wed, 27 May 2026 21:30:27 +0500 Subject: [PATCH] fix: use getApiErrorMessage in CheckoutPage for user-friendly error display --- client/src/pages/checkout/ui/CheckoutPage.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/pages/checkout/ui/CheckoutPage.tsx b/client/src/pages/checkout/ui/CheckoutPage.tsx index 40ba74f..fa0edb2 100644 --- a/client/src/pages/checkout/ui/CheckoutPage.tsx +++ b/client/src/pages/checkout/ui/CheckoutPage.tsx @@ -21,6 +21,7 @@ import { createOrder } from '@/entities/order/api/order-api' import { fetchMyAddresses } from '@/entities/user/api/address-api' import { DELIVERY_CARRIER_OPTIONS, type DeliveryCarrierCode } from '@/shared/constants/delivery-carrier' import { formatPriceRub } from '@/shared/lib/format-price' +import { getApiErrorMessage } from '@/shared/lib/get-api-error-message' import { $user } from '@/shared/model/auth' export function CheckoutPage() { @@ -263,7 +264,7 @@ export function CheckoutPage() { Создать заказ - {createMut.isError && {(createMut.error as Error).message}} + {createMut.isError && {getApiErrorMessage(createMut.error)}} )