From 97fa9904064b6799be7f329651387c5df2fd0387 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Fri, 18 Sep 2015 12:46:04 +0200 Subject: Use 400 to notify that CI API is disabled --- lib/ci/api/helpers.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/ci/api/helpers.rb') 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! -- cgit v1.2.1