Class: PagerDuty::Connection::RaiseFileNotFoundOn404
- Inherits:
-
Faraday::Middleware
- Object
- Faraday::Middleware
- PagerDuty::Connection::RaiseFileNotFoundOn404
- Defined in:
- lib/pager_duty/connection.rb
Instance Method Summary collapse
Instance Method Details
#call(env) ⇒ Object
49 50 51 52 53 54 55 56 |
# File 'lib/pager_duty/connection.rb', line 49 def call(env) response = @app.call env if response.status == 404 raise FileNotFoundError, response.env[:url].to_s else response end end |