Forward the messages in api response.
This commit is contained in:
parent
ed464edabe
commit
7240150c89
6 changed files with 8 additions and 8 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ module API
|
|||
if errors[:access_level].any?
|
||||
error!(errors[:access_level], 422)
|
||||
end
|
||||
not_found!
|
||||
not_found!(errors)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -227,7 +227,7 @@ module API
|
|||
render_api_error!("Project already forked", 409)
|
||||
end
|
||||
else
|
||||
not_found!
|
||||
not_found!("Source Project")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -133,7 +133,7 @@ module API
|
|||
env['api.format'] = :binary
|
||||
present data
|
||||
else
|
||||
not_found!
|
||||
not_found!('File')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue