Handle unauthenticated access to aiCatalogConfiguredItems endpoint

What does this MR do and why?

Handle a case when an unauthenticated user accesses the aiCatalogConfiguredItems GraphQL endpoint, which previously caused an unhandled error.

Foundational flow buttons (e.g. Fix Pipeline flow, Issue to MR flow) are visible on various pages. This GraphQL query is used to determine whether to show or hide these buttons, which means unauthenticated users visiting these pages will trigger this query and cause it to fail.

References

Screenshots or screen recordings

Before After

How to set up and validate locally

  1. Feature.enable(:ai_catalog_items_priority_order)
  2. Visit any project where Duo Agent Platform is enabled and then visit any issue page in that project. For example http://gdk.test:3000/gitlab-duo/test/-/issues/430
  3. There should be no error on the UI. Additionally, check the network tab to confirm no GraphQL errors are occurring.
  4. On master, performing the above steps will reproduce the error.

image

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #587379 (closed)

Merge request reports

Loading