Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/models/project_services/chat_notification_service.rb7
-rw-r--r--changelogs/unreleased/mrchrisw-handle-chat-error.yml4
2 files changed, 11 insertions, 0 deletions
diff --git a/app/models/project_services/chat_notification_service.rb b/app/models/project_services/chat_notification_service.rb
index 779ef54cfcb..41fbd8c8c1c 100644
--- a/app/models/project_services/chat_notification_service.rb
+++ b/app/models/project_services/chat_notification_service.rb
@@ -86,6 +86,13 @@ class ChatNotificationService < Service
raise NotImplementedError
end
+ def test(data)
+ result = execute(data)
+ { success: true, result: result }
+ rescue HTTParty::Error, Timeout::Error, SocketError, Errno::ECONNRESET, Errno::ECONNREFUSED, OpenSSL::SSL::SSLError => error
+ { success: false, result: error.message }
+ end
+
private
def notify(message, opts)
diff --git a/changelogs/unreleased/mrchrisw-handle-chat-error.yml b/changelogs/unreleased/mrchrisw-handle-chat-error.yml
new file mode 100644
index 00000000000..7ac6d6fee23
--- /dev/null
+++ b/changelogs/unreleased/mrchrisw-handle-chat-error.yml
@@ -0,0 +1,4 @@
+---
+title: Rescue test settings for chat notification services
+merge_request:
+author: