diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects/feature_flags_controller.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/projects/feature_flags_controller.rb b/app/controllers/projects/feature_flags_controller.rb index e9d450a6ce3..9142f769b28 100644 --- a/app/controllers/projects/feature_flags_controller.rb +++ b/app/controllers/projects/feature_flags_controller.rb @@ -77,7 +77,7 @@ class Projects::FeatureFlagsController < Projects::ApplicationController end else respond_to do |format| - format.json { render_error_json(result[:message]) } + format.json { render_error_json(result[:message], result[:http_status]) } end end end @@ -167,8 +167,8 @@ class Projects::FeatureFlagsController < Projects::ApplicationController render json: feature_flag_json(feature_flag), status: :ok end - def render_error_json(messages) + def render_error_json(messages, status = :bad_request) render json: { message: messages }, - status: :bad_request + status: status end end |