Skip to content

Commit

Permalink
chore: handled Notification error (#4990)
Browse files Browse the repository at this point in the history
  • Loading branch information
gurusainath authored Jul 1, 2024
1 parent e824c37 commit 936c21d
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions web/core/components/issues/peek-overview/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,19 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
() => ({
fetch: async (workspaceSlug: string, projectId: string, issueId: string) => {
try {
setLoader(true);
setError(false);
await fetchIssue(
workspaceSlug,
projectId,
issueId,
is_archived ? "ARCHIVED" : is_draft ? "DRAFT" : "DEFAULT"
);
setLoader(false);
setError(false);
} catch (error) {
setLoader(false);
setError(true);
console.error("Error fetching the parent issue");
}
},
Expand Down Expand Up @@ -382,17 +388,7 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {

useEffect(() => {
if (peekIssue) {
setLoader(true);
setError(false);
issueOperations
.fetch(peekIssue.workspaceSlug, peekIssue.projectId, peekIssue.issueId)
.catch((error) => {
console.error("Error fetching the issue", error);
setError(true);
})
.finally(() => {
setLoader(false);
});
issueOperations.fetch(peekIssue.workspaceSlug, peekIssue.projectId, peekIssue.issueId);
}
}, [peekIssue, issueOperations]);

Expand Down

0 comments on commit 936c21d

Please sign in to comment.