diff options
author | Marin Jankovski <maxlazio@gmail.com> | 2014-12-30 17:17:46 +0300 |
---|---|---|
committer | Marin Jankovski <maxlazio@gmail.com> | 2014-12-30 17:17:46 +0300 |
commit | 7240150c8986c7aa21d0eb3140ac9a4c7674a4d2 (patch) | |
tree | 6c992b9afd6c15605a5017d1ad2eea796d3e5d91 | |
parent | ed464edabeb62e35363ebadd0a5bb5ff394b6781 (diff) |
Forward the messages in api response.
-rw-r--r-- | lib/api/milestones.rb | 4 | ||||
-rw-r--r-- | lib/api/notes.rb | 2 | ||||
-rw-r--r-- | lib/api/project_hooks.rb | 4 | ||||
-rw-r--r-- | lib/api/project_members.rb | 2 | ||||
-rw-r--r-- | lib/api/projects.rb | 2 | ||||
-rw-r--r-- | lib/api/repositories.rb | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/lib/api/milestones.rb b/lib/api/milestones.rb index a4fdb752d69..4d79f5a69ae 100644 --- a/lib/api/milestones.rb +++ b/lib/api/milestones.rb @@ -48,7 +48,7 @@ module API if milestone.valid? present milestone, with: Entities::Milestone else - not_found! + not_found!("Milestone #{milestone.errors.messages}") end end @@ -72,7 +72,7 @@ module API if milestone.valid? present milestone, with: Entities::Milestone else - not_found! + not_found!("Milestone #{milestone.errors.messages}") end end end diff --git a/lib/api/notes.rb b/lib/api/notes.rb index b29c054a044..b04d623c695 100644 --- a/lib/api/notes.rb +++ b/lib/api/notes.rb @@ -61,7 +61,7 @@ module API if @note.valid? present @note, with: Entities::Note else - not_found! + not_found!("Note #{@note.errors.messages}") end end diff --git a/lib/api/project_hooks.rb b/lib/api/project_hooks.rb index 7d056b9bf58..be9850367b9 100644 --- a/lib/api/project_hooks.rb +++ b/lib/api/project_hooks.rb @@ -53,7 +53,7 @@ module API if @hook.errors[:url].present? error!("Invalid url given", 422) end - not_found! + not_found!("Project hook #{@hook.errors.messages}") end end @@ -82,7 +82,7 @@ module API if @hook.errors[:url].present? error!("Invalid url given", 422) end - not_found! + not_found!("Project hook #{@hook.errors.messages}") end end diff --git a/lib/api/project_members.rb b/lib/api/project_members.rb index 1595ed0bc36..8e32f124ea5 100644 --- a/lib/api/project_members.rb +++ b/lib/api/project_members.rb @@ -9,7 +9,7 @@ module API if errors[:access_level].any? error!(errors[:access_level], 422) end - not_found! + not_found!(errors) end end diff --git a/lib/api/projects.rb b/lib/api/projects.rb index d6dd03656a6..e1cc2348865 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -227,7 +227,7 @@ module API render_api_error!("Project already forked", 409) end else - not_found! + not_found!("Source Project") end end diff --git a/lib/api/repositories.rb b/lib/api/repositories.rb index a1a7721b288..03a556a2c55 100644 --- a/lib/api/repositories.rb +++ b/lib/api/repositories.rb @@ -133,7 +133,7 @@ module API env['api.format'] = :binary present data else - not_found! + not_found!('File') end end |