3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# File 'lib/bugwatch/error_subscriber.rb', line 3
def report(error, handled:, severity:, context: {}, source: nil)
return if Bugwatch.configuration.ignore?(error)
return unless Bugwatch.configuration.notify_for_release_stage?
return if ReportedExceptions.reported?(error)
payload = ErrorBuilder.new(error).build
payload[:context] = context.merge(
handled: handled,
severity: severity,
source: source
).compact
Notification.new(payload).deliver
ReportedExceptions.mark(error)
end
|