def handle_response(self, http_resp): """ Check the server response and raise exception if needed. :param response: httplib2 response: (headers, content). :type response: tuple :rtype: None """ headers, content = http_resp response_handler = RESPONSE_HANDLERS.get(headers.status) response_handler(http_resp)
def handle_response(self,response): """ Handle HTTP server response. :param response: httplib2 response: (headers, content). :type response: tuple :rtype: None """ headers, content = response response_handler = RESPONSE_HANDLERS.get(headers.status) response_handler(response)
def handle_response(self, response): """ Check the server response and raise exception if needed. :param response: httplib2 response: (headers, content). :type response: tuple :rtype: None """ headers, content = response # Temporary hack to catch Gremlin Plugin exceptions that return 200 status # See https://github.com/neo4j/community/issues/343 # Example: '"java.lang.IllegalArgumentException: Unknown property type on..."' if re.search('^"java.(.*).Exception:', content): # raise error... server_error(response) response_handler = RESPONSE_HANDLERS.get(headers.status) response_handler(response)
def handle_response(self, response): """ Check the server response and raise exception if needed. :param response: httplib2 response: (headers, content). :type response: tuple :rtype: None """ headers, content = response # Temporary hack to catch Gremlin Plugin exceptions that return 200 status # See https://github.com/neo4j/community/issues/343 # Example: '"java.lang.IllegalArgumentException: Unknown property type on..."' if re.search(b"^\"java.(.*).Exception:", content): # raise error... server_error(response) response_handler = RESPONSE_HANDLERS.get(headers.status) response_handler(response)
def handle_response(self,http_resp): """Handle HTTP server response.""" headers, content = http_resp response_handler = RESPONSE_HANDLERS.get(headers.status) response_handler(http_resp)
def handle_response(self,response): headers, content = response response_handler = RESPONSE_HANDLERS.get(headers.status) response_handler(response)
def handle_response(self, response): headers, content = response response_handler = RESPONSE_HANDLERS.get(headers.status) response_handler(response)