Don't return 500 error in Commits API when repository is missing
What does this MR do and why?
- Contributes to #351520 (closed)
- Sentry error: https://sentry.gitlab.net/gitlab/gitlabcom/issues/3154398
Verify that repository exists before requesting commits list.
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
- Find a project without a repository
- Visit http://127.0.0.1:3000/api/v4/projects/<project_id>/repository/commits
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.