Skip to content
Snippets Groups Projects
Commit 7240150c authored by Marin Jankovski's avatar Marin Jankovski
Browse files

Forward the messages in api response.

parent ed464eda
No related branches found
No related tags found
No related merge requests found
Loading
@@ -48,7 +48,7 @@ module API
Loading
@@ -48,7 +48,7 @@ module API
if milestone.valid? if milestone.valid?
present milestone, with: Entities::Milestone present milestone, with: Entities::Milestone
else else
not_found! not_found!("Milestone #{milestone.errors.messages}")
end end
end end
   
Loading
@@ -72,7 +72,7 @@ module API
Loading
@@ -72,7 +72,7 @@ module API
if milestone.valid? if milestone.valid?
present milestone, with: Entities::Milestone present milestone, with: Entities::Milestone
else else
not_found! not_found!("Milestone #{milestone.errors.messages}")
end end
end end
end end
Loading
Loading
Loading
@@ -61,7 +61,7 @@ module API
Loading
@@ -61,7 +61,7 @@ module API
if @note.valid? if @note.valid?
present @note, with: Entities::Note present @note, with: Entities::Note
else else
not_found! not_found!("Note #{@note.errors.messages}")
end end
end end
   
Loading
Loading
Loading
@@ -53,7 +53,7 @@ module API
Loading
@@ -53,7 +53,7 @@ module API
if @hook.errors[:url].present? if @hook.errors[:url].present?
error!("Invalid url given", 422) error!("Invalid url given", 422)
end end
not_found! not_found!("Project hook #{@hook.errors.messages}")
end end
end end
   
Loading
@@ -82,7 +82,7 @@ module API
Loading
@@ -82,7 +82,7 @@ module API
if @hook.errors[:url].present? if @hook.errors[:url].present?
error!("Invalid url given", 422) error!("Invalid url given", 422)
end end
not_found! not_found!("Project hook #{@hook.errors.messages}")
end end
end end
   
Loading
Loading
Loading
@@ -9,7 +9,7 @@ module API
Loading
@@ -9,7 +9,7 @@ module API
if errors[:access_level].any? if errors[:access_level].any?
error!(errors[:access_level], 422) error!(errors[:access_level], 422)
end end
not_found! not_found!(errors)
end end
end end
   
Loading
Loading
Loading
@@ -227,7 +227,7 @@ module API
Loading
@@ -227,7 +227,7 @@ module API
render_api_error!("Project already forked", 409) render_api_error!("Project already forked", 409)
end end
else else
not_found! not_found!("Source Project")
end end
   
end end
Loading
Loading
Loading
@@ -133,7 +133,7 @@ module API
Loading
@@ -133,7 +133,7 @@ module API
env['api.format'] = :binary env['api.format'] = :binary
present data present data
else else
not_found! not_found!('File')
end end
end end
   
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment