API: refactored and simplified error handling in merge requests API
This commit is contained in:
parent
cce35b6d05
commit
b5ef6d2268
2 changed files with 8 additions and 18 deletions
|
@ -233,7 +233,7 @@ module Gitlab
|
|||
end
|
||||
end
|
||||
|
||||
# Delete project hook
|
||||
# Deletes project hook. This is an idempotent function.
|
||||
#
|
||||
# Parameters:
|
||||
# id (required) - The ID of a project
|
||||
|
@ -248,6 +248,7 @@ module Gitlab
|
|||
@hook = ProjectHook.find(params[:hook_id])
|
||||
@hook.destroy
|
||||
rescue
|
||||
# ProjectHook can raise Error if hook_id not found
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue