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