Commit 2bd955961cdb6d0fa7e51e8fbb61581d6b101b05
1 parent
40e7846f
Exists in
master
and in
4 other branches
Changed function to `not_found`.
Instead of using funtion `error!` the function `not_found!` is used to return 404 error. Adjusted documentation accordingly.
Showing
2 changed files
with
4 additions
and
1 deletions
Show diff stats
doc/api/repositories.md
lib/api/projects.rb
| ... | ... | @@ -230,7 +230,7 @@ module Gitlab |
| 230 | 230 | # GET /projects/:id/repository/branches/:branch |
| 231 | 231 | get ":id/repository/branches/:branch" do |
| 232 | 232 | @branch = user_project.repo.heads.find { |item| item.name == params[:branch] } |
| 233 | - error!("Branch does not exist", 404) if @branch.nil? | |
| 233 | + not_found!("Branch does not exist") if @branch.nil? | |
| 234 | 234 | present @branch, with: Entities::RepoObject, project: user_project |
| 235 | 235 | end |
| 236 | 236 | ... | ... |