Class: FacebookSDK::FaradayMiddleware::RaiseApiException
- Inherits:
-
Faraday::Response::Middleware
- Object
- Faraday::Response::Middleware
- FacebookSDK::FaradayMiddleware::RaiseApiException
- Defined in:
- lib/facebook_sdk/faraday-middleware/raise_api_exception.rb
Instance Method Summary collapse
Instance Method Details
#on_complete(env) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/facebook_sdk/faraday-middleware/raise_api_exception.rb', line 7 def on_complete(env) case env[:status] when 400...499 raise FacebookSDK::ApiException, env[:body] end end |