Skip to content

Don't return 500 error in Commits API when repository is missing

What does this MR do and why?

Verify that repository exists before requesting commits list.

Screenshots or screen recordings

Before After
Screenshot_2022-02-10_at_18.15.26 Screenshot_2022-02-10_at_18.13.07

How to set up and validate locally

  1. Find a project without a repository
  2. 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.

Merge request reports

Loading