From cd0aed3d54fc01d0c361a8cf282d2de48297f66a Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Wed, 7 Jan 2015 10:46:00 +0100 Subject: Add a message when unable to save an object through api. --- lib/api/notes.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/api/notes.rb') 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 -- cgit v1.2.1