False Error loading last commit in Web IDE
Summary
Error loading last commit
appears every time you commit something in Web IDE with creating a new branch. The branch is created and committing works as expected, so the error messaging is incorrect and confusing to the user.
Steps to reproduce
- Open any repository in Web IDE
- Make a change
- Click Commit and choose to create a new branch (without MR so that the error stays on the screen) & submit
- You will see
Error loading last commit
appearing
What is the current bug behavior?
The commit is created and the relevant API call is ok, however the error is shown to the user. Creating a new branch AND MR works too, although the error pops up briefly before being redirected to the new MR form.
What is the expected correct behavior?
No error should appear
Relevant logs and/or screenshots
Error in the dev tools console:
Uncaught TypeError: can't access property "id", getters.lastCommit is null
lastCommitPipelines index.js:94
Possible fixes
Possible explanation - the browser kills requests while loading the next page, which causes the request handler to error out. We should probably gracefully terminate the request so that whatever is listening to the response is never triggered.