Error when showing inline scanner findings on immediate pageload

Summary

When immediately loading an MR page after a git push we see Something went wrong fetching the scanner findings. Please try again.. This is somewhat expected as the pipeline hasn't even started but we should handle the usecase more gracefully as its a bit confusing

Steps to reproduce

  1. Open an MR
  2. Git Push some changes
  3. Immediately navigate to the MR's diff tab
  4. Hope you hit the race condition

Example Project

What is the current bug behavior?

An error is shown

What is the expected correct behavior?

Suppress error if report is unavailable?

Relevant logs and/or screenshots

Screenshot_2024-06-21_at_06.40.35

Output of checks

This bug happens on GitLab.com

Possible fixes

This error presumably gets raised from here.

IMO we shouldn't throw an error at all if we cannot locate the findings but instead simple exclude them from showing up inline

Edited by Lucas Charles