diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-09-18 13:46:04 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-09-18 13:46:47 +0300 |
commit | 97fa9904064b6799be7f329651387c5df2fd0387 (patch) | |
tree | 58570725e5d3d3a2c7dc38e184c97d8362d485f9 /lib | |
parent | e41a29b0c381458f789d62cfeb9ad94920f78804 (diff) |
Use 400 to notify that CI API is disabled
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ci/api/helpers.rb | 4 |
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! |