summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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!