Skip to content

Instantly share code, notes, and snippets.

@kyleslattery
Created April 14, 2010 00:06
Show Gist options
  • Save kyleslattery/365267 to your computer and use it in GitHub Desktop.
Save kyleslattery/365267 to your computer and use it in GitHub Desktop.
module Viddler
class Request
private
def parse_response(raw_response)
raise EmptyResponseError if raw_response.blank?
response_hash = Hash.from_xml(raw_response.to_s)
if response_error = response_hash['error']
raise ResponseError.new(viddler_error_message(response_error))
end
response_hash
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment