Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-4150

Python server or cpp client do not handle an unimplemented service method gracefully

Agile BoardAttach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      I added a new method to the ThriftTest service and I implemented the server and client in C+. In the C+ client I added exception handling to catch TProtocolException and std::exception. I expected that when TestClient sent in a method that the server had not implemented, a TProtocolException(NOT_IMPLEMENTED) would be returned. The server log indicates it got to this point in theory:

      ERROR:root:'TestHandler' object has no attribute 'testRequired'
      Traceback (most recent call last):
        File "/home/jking/thrift/github/thrift/test/py/gen-py/ThriftTest/ThriftTest.py", line 1593, in process_testRequired
          self._handler.testRequired(args.req)
      

      However on the C++ client side, a std::exception was received and NOT a TProtocolException, which is a bug:

      testClient.testRequired() =>*** FAILED *** got back std::exception Internal error
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            jking3 James E. King III

            Dates

              Created:
              Updated:

              Slack

                Issue deployment