Fix errors caused by expired sessions
What does this MR do and why?
Fix errors caused by expired sessions
When user session ends and the user tries to navigate between tabs, XHR calls will end up returning a redirect and graphql calls will return project null. These changes make sure we do type-checking before accessing properties of objects.
Changelog: fixed
Screenshots or screen recordings
Note how the console is silent. In master many errors are thrown which cause our Sentry to receive a lot of events.
How to set up and validate locally
- You'll need two tabs open.
- Make sure you're logged in.
- Create a private repository in one tab.
- Go ahead and modify the README.md file to create an MR.
- Once the MR is there, visit the other tab and sign out.
- Check the tab with the open MR and click to the
Changes
tab - When you check the console you should see this error.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #413627 (closed)