Skip to content

Fix errors caused by expired sessions

Savas Vedova requested to merge 413627-add-type-checking into master

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

supress-errors

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

  1. You'll need two tabs open.
  2. Make sure you're logged in.
  3. Create a private repository in one tab.
  4. Go ahead and modify the README.md file to create an MR.
  5. Once the MR is there, visit the other tab and sign out.
  6. Check the tab with the open MR and click to the Changes tab
  7. 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.

Related to #413627 (closed)

Merge request reports