diff --git a/web/components/issues/sidebar-select/label.tsx b/web/components/issues/sidebar-select/label.tsx index 464554aec..fa0e8f43b 100644 --- a/web/components/issues/sidebar-select/label.tsx +++ b/web/components/issues/sidebar-select/label.tsx @@ -9,6 +9,7 @@ import { Popover, Transition } from "@headlessui/react"; import { IssueLabelService } from "services/issue"; // hooks import useUser from "hooks/use-user"; +import useToast from "hooks/use-toast"; // ui import { Input } from "@plane/ui"; import { IssueLabelSelect } from "../select"; @@ -57,6 +58,8 @@ export const SidebarLabelSelect: React.FC = ({ defaultValues, }); + const { setToastAlert } = useToast(); + const { user } = useUser(); const { data: issueLabels, mutate: issueLabelMutate } = useSWR( @@ -79,6 +82,14 @@ export const SidebarLabelSelect: React.FC = ({ submitChanges({ labels: [...(issueDetails?.labels ?? []), res.id] }); setCreateLabelForm(false); + }) + .catch((e) => { + console.log(e); + setToastAlert({ + type: "error", + title: "Error!", + message: e.error ? e.error : "Something went wrong. Please try again.", + }); }); };