diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-12-04 16:07:01 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-12-04 16:07:01 +0300 |
commit | db2edff937cbc309c10bb1a987356a58f8a9c8fa (patch) | |
tree | d2d19fb102fb834938a0560f610e15b4a54f3a5f /app/controllers/projects/hooks_controller.rb | |
parent | 490ae737c748a393e57040bfd649bb1c4244e494 (diff) |
Handle web hook exception
Write to log if web hook cant be executed. This prevents 500 error when
test web hook with invalid URL and prevent exceptions and retries in
sidekiq
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/controllers/projects/hooks_controller.rb')
-rw-r--r-- | app/controllers/projects/hooks_controller.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/controllers/projects/hooks_controller.rb b/app/controllers/projects/hooks_controller.rb index cab8fd76e6c..2d6c3111192 100644 --- a/app/controllers/projects/hooks_controller.rb +++ b/app/controllers/projects/hooks_controller.rb @@ -26,6 +26,7 @@ class Projects::HooksController < Projects::ApplicationController def test if !@project.empty_repo? status = TestHookService.new.execute(hook, current_user) + if status flash[:notice] = 'Hook successfully executed.' else |