Class: OopsieExceptions::ErrorSubscriber

Inherits:
Object
  • Object
show all
Defined in:
lib/oopsie_exceptions/error_subscriber.rb

Instance Method Summary collapse

Instance Method Details

#report(error, handled:, severity:, context: {}, source: nil) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/oopsie_exceptions/error_subscriber.rb', line 5

def report(error, handled:, severity:, context: {}, source: nil)
  return if severity == :warning

  merged_context = context.merge(
    rails_error_reporter: true,
    severity: severity.to_s,
    source: source
  ).compact

  OopsieExceptions.report(error, context: merged_context, handled: handled)
end