Skip to content

Commit 5284bbd

Browse files
committed
fix(web): show pull request linking errors
1 parent 1b68b17 commit 5284bbd

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

‎apps/web/src/components/ChatMarkdown.tsx‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1855,6 +1855,22 @@ function ChatMarkdown({
18551855
updateThreadLink: updateThreadPullRequestLink,
18561856
reportFailure: (operation, cause) => {
18571857
reportMarkdownActionFailure({ operation, target: href }, cause);
1858+
if (
1859+
operation === "link-pull-request-to-thread" ||
1860+
operation === "unlink-pull-request-from-thread"
1861+
) {
1862+
toastManager.add(
1863+
stackedThreadToast({
1864+
type: "error",
1865+
title:
1866+
operation === "link-pull-request-to-thread"
1867+
? "Unable to link pull request"
1868+
: "Unable to unlink pull request",
1869+
description:
1870+
cause instanceof Error ? cause.message : "The request failed.",
1871+
}),
1872+
);
1873+
}
18581874
},
18591875
});
18601876
}}

0 commit comments

Comments
 (0)