From 04276fcb6ff6acfa6eec5e661ad31e3a385efcad Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Tue, 11 Jul 2023 14:54:25 +0300 Subject: [PATCH] process/calculate, process/create-kp: pass error.message to notification --- apps/web/process/calculate/action.ts | 5 +++-- apps/web/process/create-kp/action.ts | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/web/process/calculate/action.ts b/apps/web/process/calculate/action.ts index ea87d90..b0d319f 100644 --- a/apps/web/process/calculate/action.ts +++ b/apps/web/process/calculate/action.ts @@ -53,9 +53,10 @@ export async function action({ store, trpcClient }: ProcessContext) { }); } }) - .catch((error) => { + .catch((error_) => { + const error = error_ as Error; notification.error({ - description: JSON.stringify(error), + description: error.message, key, message: errorMessage, placement: 'bottomRight', diff --git a/apps/web/process/create-kp/action.ts b/apps/web/process/create-kp/action.ts index c704944..c1ea0dd 100644 --- a/apps/web/process/create-kp/action.ts +++ b/apps/web/process/create-kp/action.ts @@ -80,9 +80,10 @@ export function action({ store, trpcClient, apolloClient }: ProcessContext) { } } }) - .catch((error) => { + .catch((error_) => { + const error = error_ as Error; notification.error({ - description: JSON.stringify(error), + description: error.message, key, message: errorMessage, placement: 'bottomRight',