Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

fix: issue link error toast alert (#5068)

Anmol Singh Bhatia4e815c0fed76
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 48370d04cb..f0a6ed3163 100644
--- a/web/core/components/issues/issue-detail-widgets/links/helper.tsx
+++ b/web/core/components/issues/issue-detail-widgets/links/helper.tsx
@@ -21,9 +21,9 @@ export const useLinkOperations = (workspaceSlug: string, projectId: string, issu
type: TOAST_TYPE.SUCCESS,
title: "Link created",
});
- } catch (error) {
+ } catch (error: any) {
setToast({
- message: "The link could not be created",
+ message: error?.data?.error ?? "The link could not be created",
type: TOAST_TYPE.ERROR,
title: "Link not created",
});
diff --git a/web/core/components/issues/issue-detail/links/root.tsx b/web/core/components/issues/issue-detail/links/root.tsx
index e50244fd43..1450bb4ce0 100644
--- a/web/core/components/issues/issue-detail/links/root.tsx
+++ b/web/core/components/issues/issue-detail/links/root.tsx
@@ -52,9 +52,9 @@ export const IssueLinkRoot: FC<TIssueLinkRoot> = (props) => {
title: "Link created",
});
toggleIssueLinkModal(false);
- } catch (error) {
+ } catch (error: any) {
setToast({
- message: "The link could not be created",
+ message: error?.data?.error ?? "The link could not be created",
type: TOAST_TYPE.ERROR,
title: "Link not created",
});