summaryrefslogtreecommitdiff
path: root/lib/api/notes.rb
diff options
context:
space:
mode:
authorMarin Jankovski <maxlazio@gmail.com>2015-01-07 10:46:00 +0100
committerMarin Jankovski <maxlazio@gmail.com>2015-01-07 10:46:00 +0100
commitcd0aed3d54fc01d0c361a8cf282d2de48297f66a (patch)
tree9bd4d1a97827d95ad9e854ec5215dddfa1c953b9 /lib/api/notes.rb
parent0da5154b5a71216a9bbff861561636906ca8c167 (diff)
downloadgitlab-ce-cd0aed3d54fc01d0c361a8cf282d2de48297f66a.tar.gz
Add a message when unable to save an object through api.
Diffstat (limited to 'lib/api/notes.rb')
-rw-r--r--lib/api/notes.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/notes.rb b/lib/api/notes.rb
index b04d623c695..3726be7c537 100644
--- a/lib/api/notes.rb
+++ b/lib/api/notes.rb
@@ -93,7 +93,7 @@ module API
if @note.valid?
present @note, with: Entities::Note
else
- bad_request!('Invalid note')
+ render_api_error!("Failed to save note #{note.errors.messages}", 400)
end
end