Commit 4e39fc1a authored by Robert Schilling's avatar Robert Schilling

Fix rubocop

parent a14e9cfd
...@@ -157,11 +157,9 @@ module API ...@@ -157,11 +157,9 @@ module API
end end
def find_branch!(branch_name) def find_branch!(branch_name)
begin user_project.repository.find_branch(branch_name) || not_found!('Branch')
user_project.repository.find_branch(branch_name) || not_found!('Branch') rescue Gitlab::Git::CommandError
rescue Gitlab::Git::CommandError render_api_error!('The branch refname is invalid', 400)
render_api_error!('The branch refname is invalid', 400)
end
end end
def find_project_label(id) def find_project_label(id)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment