Sha256: 3ee50abfbdf12b13eec39cd442cf73a902bcc2df0383f040ff775fc45e2abc1a

Contents?: true

Size: 280 Bytes

Versions: 1

Compression:

Stored size: 280 Bytes

Contents


module FacebookSDK
  module FaradayMiddleware
    class RaiseApiException < Faraday::Response::Middleware

      def on_complete(env)
        case env[:status]
        when 400...499
          raise FacebookSDK::ApiException, env[:body]
        end
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
facebook_sdk-0.0.2 lib/facebook_sdk/faraday-middleware/raise_api_exception.rb