summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2015-09-18 12:46:04 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2015-09-18 12:46:47 +0200
commit97fa9904064b6799be7f329651387c5df2fd0387 (patch)
tree58570725e5d3d3a2c7dc38e184c97d8362d485f9
parente41a29b0c381458f789d62cfeb9ad94920f78804 (diff)
downloadgitlab-ce-allow-to-disable-ci.tar.gz
Use 400 to notify that CI API is disabledallow-to-disable-ci
-rw-r--r--lib/ci/api/helpers.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/ci/api/helpers.rb b/lib/ci/api/helpers.rb
index 13aa71f4630..8e893aa5cc6 100644
--- a/lib/ci/api/helpers.rb
+++ b/lib/ci/api/helpers.rb
@@ -4,7 +4,9 @@ module Ci
UPDATE_RUNNER_EVERY = 60
def check_enable_flag!
- not_found! unless current_application_settings.ci_enabled
+ unless current_application_settings.ci_enabled
+ render_api_error!('400 (Bad request) CI is disabled', 400)
+ end
end
def authenticate_runners!