Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-01-25 05:50:38 +0300
committerMatija Čupić <matteeyah@gmail.com>2018-02-05 20:58:18 +0300
commitbf2a040cf9fb8e0eb3576732f3cda6fe6326e65d (patch)
tree8884cfc202b6550db3c6b9292fa93a77ebdbadab /app/controllers/projects
parent1292c158ce909e9054f842a90095810c0d464e18 (diff)
Pass validation errors in JSON endpoint
Diffstat (limited to 'app/controllers/projects')
-rw-r--r--app/controllers/projects/variables_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/projects/variables_controller.rb b/app/controllers/projects/variables_controller.rb
index 8bee1b97d14..9c0dad393c3 100644
--- a/app/controllers/projects/variables_controller.rb
+++ b/app/controllers/projects/variables_controller.rb
@@ -6,7 +6,7 @@ class Projects::VariablesController < Projects::ApplicationController
format.json do
return head :ok if @project.update(variables_params)
- head :bad_request
+ render status: :bad_request, json: @project.errors.to_hash
end
end
end