def parse_json(response)
			json_response = JSON.parse(response)
			error = json_response['error']
			if !error.nil? then raise APIException.new(error) end
			return json_response
		end
def parse_json(response)
			json_response = JSON.parse(response)
			error = json_response['error']
			if !error.nil? then raise APIException.new(error) end
			return json_response
		end
convenience method that parses a response into json AND makes sure there are no errors