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)}} )