diff options
author | Marin Jankovski <maxlazio@gmail.com> | 2015-01-07 10:46:00 +0100 |
---|---|---|
committer | Marin Jankovski <maxlazio@gmail.com> | 2015-01-07 10:46:00 +0100 |
commit | cd0aed3d54fc01d0c361a8cf282d2de48297f66a (patch) | |
tree | 9bd4d1a97827d95ad9e854ec5215dddfa1c953b9 /lib/api/notes.rb | |
parent | 0da5154b5a71216a9bbff861561636906ca8c167 (diff) | |
download | gitlab-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.rb | 2 |
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 |