Skip to content

Respond with more appropriate HTTP status code when repo does not exist

Michael Kozono requested to merge mk/fix-error-code-for-repo-does-not-exist into master

What does this MR do?

Changes the HTTP status code to 404 when attempting to pull/push a project without a repo.

Are there points in the code the reviewer needs to double check?

@gabriel suggested 409 or 412 as more appropriate than 404 https://gitlab.slack.com/archives/C32LCGC1H/p1519422191000140?thread_ts=1519414743.000070&cid=C32LCGC1H

Why was this MR needed?

It's confusing for devs and customer sys-admins, and most often the repo actually does not exist so this would guide us to the problem more quickly.

This has been coming up frequently for Geo installations, including GitLab.com: gitlab-com/migration#216 (comment 59886491)

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Merge request reports