Skip to content

Avoid 500 when evaluating `DiffNote#supports_suggestion?` and commit is not reachable

Oswaldo Ferreira requested to merge osw-avoid-500-on-suggestions-check into master

What does this MR do?

DiffNote#noteable can return nil for comments in commits when the commit_id is not reachable, or do not exists any longer. This MR handles the error scenario when evaluating DiffNote#supports_suggestion?.

What are the relevant issue numbers?

closes https://gitlab.com/gitlab-org/gitlab-ce/issues/57570

Does this MR meet the acceptance criteria?

Edited by Oswaldo Ferreira

Merge request reports