Parent

Methods

Class/Module Index [+]

Quicksearch

Twitter::REST::Response::RaiseError

Public Instance Methods

on_complete(response) click to toggle source
# File lib/twitter/rest/response/raise_error.rb, line 8
def on_complete(response)
  status_code = response.status.to_i
  klass = Twitter::Error.errors[status_code]
  return unless klass
  error = if klass == Twitter::Error::Forbidden
    handle_forbidden_errors(response)
  else
    klass.from_response(response)
  end
  fail(error)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.