Class: SharkOnLambda::Middleware::Honeybadger

Inherits:
Base
  • Object
show all
Defined in:
lib/shark_on_lambda/middleware/honeybadger.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#app

Instance Method Summary collapse

Methods inherited from Base

#call

Constructor Details

#initialize(app, tags: '') ⇒ Honeybadger

Returns a new instance of Honeybadger.



8
9
10
11
12
# File 'lib/shark_on_lambda/middleware/honeybadger.rb', line 8

def initialize(app, tags: '')
  super(app)

  @tags = tags
end

Instance Attribute Details

#tagsObject (readonly)

Returns the value of attribute tags.



6
7
8
# File 'lib/shark_on_lambda/middleware/honeybadger.rb', line 6

def tags
  @tags
end

Instance Method Details

#call!(env) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/shark_on_lambda/middleware/honeybadger.rb', line 14

def call!(env)
  app.call(env)
rescue StandardError => e
  notify(e, env) unless shark_error?(e) && client_error?(e)

  raise e
end