class Foederati::FaradayMiddleware::ParseUnsupportedContentTypes
Response handler for unspported content types returned by provider APIs
For instance, if upstream APIs break and start returning HTML or text from load balancers.
Public Instance Methods
process_response(env)
click to toggle source
Calls superclass method
# File lib/foederati/faraday_middleware.rb, line 12 def process_response(env) super content_type = env.response_headers['Content-Type'] fail Faraday::ParsingError, %(API responded with Content-Type "#{content_type}" and status #{env[:status]}) end