Skip to content

Handle accessing revision and path in empty repository in FindCommits

Sami Hiltunen requested to merge smh-fix-find-commits-regression into master

FindCommits previously didn't return an error when accessing an empty repository with a given revision and path. This was because the RPC previously didn't return errors from the Git command to the client. The error handling was fixed in 588d901f which led to the errors now being returned to the client. This leads to Rails API returning internal server errors to clients as previously working API invocations now started returning internal errors. Fix this by handling the error that is raised by Git in such a scenario and returning a NotFound error to Rails that it knows to handle.

Closes #5976 (closed)

Merge request reports