From 8d0512ac4c70eeafe72a83eb41673d5a4e975ea1 Mon Sep 17 00:00:00 2001 From: JayashTripathy Date: Mon, 26 May 2025 18:25:48 +0530 Subject: [PATCH 1/2] fix: backend error message toast when getting error --- .../components/issues/issue-detail-widgets/links/helper.tsx | 4 ++-- web/core/store/issue/issue-details/link.store.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/core/components/issues/issue-detail-widgets/links/helper.tsx b/web/core/components/issues/issue-detail-widgets/links/helper.tsx index 5b85667afad..ad849eb3adc 100644 --- a/web/core/components/issues/issue-detail-widgets/links/helper.tsx +++ b/web/core/components/issues/issue-detail-widgets/links/helper.tsx @@ -32,7 +32,7 @@ export const useLinkOperations = ( }); } catch (error: any) { setToast({ - message: error?.data?.url?.error ?? t("links.toasts.not_created.message"), + message: error?.data?.error ?? t("links.toasts.not_created.message"), type: TOAST_TYPE.ERROR, title: t("links.toasts.not_created.title"), }); @@ -50,7 +50,7 @@ export const useLinkOperations = ( }); } catch (error: any) { setToast({ - message: error?.data?.url?.error ?? t("links.toasts.not_updated.message"), + message: error?.data?.error ?? t("links.toasts.not_updated.message"), type: TOAST_TYPE.ERROR, title: t("links.toasts.not_updated.title"), }); diff --git a/web/core/store/issue/issue-details/link.store.ts b/web/core/store/issue/issue-details/link.store.ts index 5a0ea20e6fc..763787a1bfb 100644 --- a/web/core/store/issue/issue-details/link.store.ts +++ b/web/core/store/issue/issue-details/link.store.ts @@ -141,7 +141,7 @@ export class IssueLinkStore implements IIssueLinkStore { set(this.linkMap, [linkId, key], initialData[key as keyof TIssueLink]); }); }); - return initialData; + throw error; } }; From fb23bc23ca6b055929cd769c523b5a252b2e37db Mon Sep 17 00:00:00 2001 From: JayashTripathy Date: Mon, 26 May 2025 18:49:08 +0530 Subject: [PATCH 2/2] fix: toast in small screens --- packages/ui/src/toast/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ui/src/toast/index.tsx b/packages/ui/src/toast/index.tsx index 94cf1fa28c0..5ccbd775b9a 100644 --- a/packages/ui/src/toast/index.tsx +++ b/packages/ui/src/toast/index.tsx @@ -108,7 +108,7 @@ export const setToast = (props: SetToastProps) => { )} >