From 024b6f6f717b6cc65f579e2a31278e050c110da1 Mon Sep 17 00:00:00 2001 From: Chika Date: Thu, 8 Dec 2022 11:59:43 +0300 Subject: [PATCH] =?UTF-8?q?createKP:=20=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4=20?= =?UTF-8?q?=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B8=20=D0=B8=D0=B7=20=D0=BE?= =?UTF-8?q?=D1=82=D0=B2=D0=B5=D1=82=D0=B0=20=D1=81=D0=B5=D1=80=D0=B2=D0=B5?= =?UTF-8?q?=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stores/CalculationStore/Effects/actions/createKP.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/client/stores/CalculationStore/Effects/actions/createKP.ts b/src/client/stores/CalculationStore/Effects/actions/createKP.ts index e0ec9ab..6a03760 100644 --- a/src/client/stores/CalculationStore/Effects/actions/createKP.ts +++ b/src/client/stores/CalculationStore/Effects/actions/createKP.ts @@ -89,13 +89,12 @@ export default async function (this: ICalculationStore) { this.setOptions('selectQuote', quotes); }); } catch (err) { + const { response } = err as AxiosError; + openNotification({ type: 'error', message: 'Ошибка во время создания КП!', + description: response?.data?.message, }); - - const { response } = err as AxiosError; - const error = response?.data || err; - throw JSON.stringify(error); } }