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

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

    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

            People

            • Assignee:
              Unassigned
              Reporter:
              jking3 James E. King III
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: