def treat_response
        # note that the partial_content status should be processed differently.
        # look at http://tinkerpop.apache.org/docs/3.0.1-incubating/ for more info
        ok_status = [:success, :no_content, :partial_content].map { |st| STATUS[st] }
        unless ok_status.include?(@response['status']['code'])
          fail ::GremlinClient::ServerError.new(@response['status']['code'], @response['status']['message'])
        end
        @response['result']
      end
def treat_response
        # note that the partial_content status should be processed differently.
        # look at http://tinkerpop.apache.org/docs/3.0.1-incubating/ for more info
        ok_status = [:success, :no_content, :partial_content].map { |st| STATUS[st] }
        unless ok_status.include?(@response['status']['code'])
          fail ::GremlinClient::ServerError.new(@response['status']['code'], @response['status']['message'])
        end
        @response['result']
      end
we validate our response here to make sure it is going to be
 raising exceptions in the right thread