Blame: fix some issues with the stream#63865
Conversation
There was a problem hiding this comment.
Looking over the documentation for fetchEventSource, it will retry automatically if onError does not re-throw the error. We will publish the error to the observable in the error callback of the fetchEventSource promise, so we do not need to publish the error here.
There was a problem hiding this comment.
If we don't throw an error here, the stream doesn't end properly.
There was a problem hiding this comment.
useObservable throws an error rather than returns one. So to satisfy the return type of this function, we need to catch that error and return an ErrorLike. Since we weren't catching the error, we were getting ugly full-page errors rather than the nice alert at the top of the page as was intended.
c2feca9 to
bd4781e
Compare
9ebafb8 to
8608152
Compare
|
The backport to To backport this PR manually, you can either: Via the sg toolUse the sg backport -r 5.5.x -p 63865Via your terminalTo backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-5.5.x 5.5.x
# Navigate to the new working tree
cd .worktrees/backport-5.5.x
# Create a new branch
git switch --create backport-63865-to-5.5.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 d91fab39e287d57d00f35fb8952f5b7daabfa1d2
# Push it to GitHub
git push --set-upstream origin backport-63865-to-5.5.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-5.5.xIf you encouter conflict, first resolve the conflict and stage all files, then run the commands below: git cherry-pick --continue
# Push it to GitHub
git push --set-upstream origin backport-63865-to-5.5.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-5.5.x
Once the pull request has been created, please ensure the following:
|
Contributes to SRCH-738 Notably, this does not yet identify the root cause of SRCH-738, but it does identify and fix some confounding bugs. It's possible that these actually also _cause_ some of the issues in SRCH-738, but I wanted to at least push these to dotcom, where we can reproduce some of the weirdness. At the very least, it doesn't explain the auth errors being reported. (cherry picked from commit d91fab3)
Contributes to SRCH-738 Notably, this does not yet identify the root cause of SRCH-738, but it does identify and fix some confounding bugs. It's possible that these actually also _cause_ some of the issues in SRCH-738, but I wanted to at least push these to dotcom, where we can reproduce some of the weirdness. At the very least, it doesn't explain the auth errors being reported. (cherry picked from commit d91fab3) Co-authored-by: Michael Bahr <michael.bahr@sourcegraph.com>
Contributes to SRCH-738
Notably, this does not yet identify the root cause of SRCH-738, but it does identify and fix some confounding bugs. It's possible that these actually also cause some of the issues in SRCH-738, but I wanted to at least push these to dotcom, where we can reproduce some of the weirdness. At the very least, it doesn't explain the auth errors being reported.
Test plan
Tested that, in the event of an error
Before:

After:

Changelog