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

Reporting a missing required field (TProtocolException::INVALID_DATA) to the client is not informative enough

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 0.8, 0.9, 0.9.1, 0.9.2, 0.9.3
    • None
    • None

    Description

      This may affect all languages, however it was initially reported against C++ by ggodik in THRIFT-2342:

      Every time a required field is not set, the exception that gets generated is a very generic:
      throw TProtocolException(TProtocolException::INVALID_DATA);

      (see - https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob;f=compiler/cpp/src/generate/t_cpp_generator.cc;h=298096d3265baa1f008501eb7c26bb4ae96ffa4b;hb=HEAD#l1372)

      It would be useful to indicate the invalid data field in this exception case.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated: