Class: PagerDuty::Connection::RaiseFileNotFoundOn404

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

Instance Method Summary collapse

Instance Method Details

#call(env) ⇒ Object



19
20
21
22
23
24
25
26
# File 'lib/pager_duty/connection.rb', line 19

def call(env)
  response = @app.call env
  if response.status == 404
    raise FileNotFoundError, response.env[:url].to_s
  else
    response
  end
end