summaryrefslogtreecommitdiff
path: root/lib/api/labels.rb
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2014-08-18 17:16:32 +0200
committerJacob Vosmaer <contact@jacobvosmaer.nl>2014-08-18 17:16:32 +0200
commit6dc24e3bcfa35daa1a39d65f5eb5bc49729309a5 (patch)
tree98823f2310c6431ad9a50d29ada6a868bffd5f2b /lib/api/labels.rb
parent2fd7d6e2efd6c0bd86c85900f8279db8ac172f3f (diff)
parent4ca3f64719f924a483b19ba921f41ac06c3b6a63 (diff)
downloadgitlab-ce-6dc24e3bcfa35daa1a39d65f5eb5bc49729309a5.tar.gz
Merge pull request #7527 from Razer6/api_labels_return_code
API: Fix labels return code
Diffstat (limited to 'lib/api/labels.rb')
-rw-r--r--lib/api/labels.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/labels.rb b/lib/api/labels.rb
index d1684b2293c..2fdf53ffec2 100644
--- a/lib/api/labels.rb
+++ b/lib/api/labels.rb
@@ -39,7 +39,7 @@ module API
if label.valid?
present label, with: Entities::Label
else
- render_api_error!(label.errors.full_messages.join(', '), 405)
+ render_api_error!(label.errors.full_messages.join(', '), 400)
end
end
@@ -95,7 +95,7 @@ module API
if label.update(attrs)
present label, with: Entities::Label
else
- render_api_error!(label.errors.full_messages.join(', '), 405)
+ render_api_error!(label.errors.full_messages.join(', '), 400)
end
end
end