Skip to content

Fix NoMethodError when current_user is not set

Vasilii Iakliushin requested to merge fix_no_method_error_for_ai_response into master

What does this MR do and why?

Sentry error: https://new-sentry.gitlab.net/organizations/gitlab/issues/111267

Problem

Tests don't verify the case when unauthorized user requests data about an authorized one. It leads to 500 error.

Solution

  • Add a check for unauthorized user case
  • Modify tests to verify that

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading