Skip to content

Commit 2f42744

Browse files
authored
Merge pull request #494 from cdadityang/master
Add Content-Type header to Slack notifier - req. for discord
2 parents b9a42da + 1efde75 commit 2f42744

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/exception_notifier/slack_notifier.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ def information_from_options(exception_class, options)
7272
exception_name = "*#{measure_word}* `#{exception_class}`"
7373
env = options[:env]
7474

75+
options[:headers] ||= {}
76+
options[:headers]['Content-Type'] = 'application/json'
77+
7578
if env.nil?
7679
data = options[:data] || {}
7780
text = "#{exception_name} *occured in background*\n"

0 commit comments

Comments
 (0)