class Faraday::Disqussion::RaiseHttp5xx

@private

Public Instance Methods

on_complete(env) click to toggle source
# File lib/faraday/disqussion/raise_http_5xx.rb, line 8
def on_complete(env)
  case env[:status].to_i
  when 500
    raise ::Disqussion::InternalServerError.new(error_message(env, "Something is technically wrong."), env[:response_headers])
  end
end

Private Instance Methods

error_message(env, body=nil) click to toggle source
# File lib/faraday/disqussion/raise_http_5xx.rb, line 17
def error_message(env, body=nil)
  "#{env[:method].to_s.upcase} #{env[:url].to_s}: #{[env[:status].to_s + ':', body].compact.join(' ')} Check http://status.disqus.com/ for updates on the status of the Disqus service."
end