process/calculate, process/create-kp: pass error.message to notification

This commit is contained in:
vchikalkin 2023-07-11 14:54:25 +03:00
parent ea7060745b
commit 04276fcb6f
2 changed files with 6 additions and 4 deletions

View File

@ -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',

View File

@ -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',