summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorTiago Botelho <tiagonbotelho@hotmail.com>2018-10-22 15:49:20 +0100
committerTiago Botelho <tiagonbotelho@hotmail.com>2018-10-25 10:10:45 +0100
commit084a8b6101c25e5d3d4f97f078abd9a649a2fb64 (patch)
tree888cd28681c079561effde22bf6094e7c8db71b4 /lib/api
parentf5d71ad8f3d1899a29bc12c4fcc8847b14195e3a (diff)
downloadgitlab-ce-084a8b6101c25e5d3d4f97f078abd9a649a2fb64.tar.gz
Adds tracing messages for slow git pushes
Whenever a git push takes more than 50 seconds the user will receive a trace from each check performed along with their timings
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/internal.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/api/internal.rb b/lib/api/internal.rb
index 4dd6b19e353..ae40b5f7557 100644
--- a/lib/api/internal.rb
+++ b/lib/api/internal.rb
@@ -65,6 +65,8 @@ module API
result
rescue Gitlab::GitAccess::UnauthorizedError => e
break response_with_status(code: 401, success: false, message: e.message)
+ rescue Gitlab::GitAccess::TimeoutError => e
+ break response_with_status(code: 503, success: false, message: e.message)
rescue Gitlab::GitAccess::NotFoundError => e
break response_with_status(code: 404, success: false, message: e.message)
end