diff --git a/apps/desktop/src/lib/branch/SeriesHeader.svelte b/apps/desktop/src/lib/branch/SeriesHeader.svelte index 5f4205f648..27922fc05e 100644 --- a/apps/desktop/src/lib/branch/SeriesHeader.svelte +++ b/apps/desktop/src/lib/branch/SeriesHeader.svelte @@ -42,7 +42,12 @@ lastPush: Date | undefined; } - const { branch, isTopBranch: isTopSeries, isBottomBranch: isBottomSeries, lastPush }: Props = $props(); + const { + branch, + isTopBranch: isTopSeries, + isBottomBranch: isBottomSeries, + lastPush + }: Props = $props(); let descriptionVisible = $state(!!branch.description); @@ -79,7 +84,7 @@ let kebabContextMenuTrigger = $state(); let seriesHeaderEl = $state(); let seriesDescriptionEl = $state(); - + let targetBaseError = $state(); let contextMenuOpened = $state(false); const topPatch = $derived(branch?.patches[0]); @@ -177,12 +182,19 @@ $prService && $forge?.name === 'github' && branch.prNumber && + !targetBaseError && $pr?.state === 'open' ) { - $prService?.update(branch.prNumber, { targetBase }).then(async () => { - await $forgeListing?.refresh(); - await updateStatusAndChecks(); - }); + $prService + ?.update(branch.prNumber, { targetBase }) + .then(async () => { + await $forgeListing?.refresh(); + await updateStatusAndChecks(); + }) + .catch((err) => { + showError('Failed to update PR target base', err.message ? err.message : err); + targetBaseError = err; + }); } });