summaryrefslogtreecommitdiff
path: root/lib/api/branches.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/branches.rb')
-rw-r--r--lib/api/branches.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/api/branches.rb b/lib/api/branches.rb
index 1ee120f982a..0db5bb82296 100644
--- a/lib/api/branches.rb
+++ b/lib/api/branches.rb
@@ -17,6 +17,10 @@ module API
authorize! :download_code, user_project
end
+ rescue_from Gitlab::Git::Repository::NoRepository do
+ not_found!
+ end
+
helpers do
params :filter_params do
optional :search, type: String, desc: 'Return list of branches matching the search criteria'