Class: InterruptHelper::PagerDuty::RaiseNon202

Inherits:
Faraday::Middleware
  • Object
show all
Defined in:
lib/interrupt_helper/pager_duty.rb

Instance Method Summary collapse

Instance Method Details

#call(env) ⇒ Object

Raises:



31
32
33
34
35
# File 'lib/interrupt_helper/pager_duty.rb', line 31

def call(env)
  response = @app.call env
  raise APIError, "bad response code: #{response.status}" unless response.status == 202
  response
end