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

Different Behaviour for same thrift call in nodejs client

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 0.9.3
    • Fix Version/s: None
    • Component/s: Node.js - Library
    • Labels:
      None

      Description

      Hi

      i am using thrift nodejs client for rpc communications there is weird behaviour in one of my thrift call. so below is function sequence in which it is getting called. my function name is "myFunction". 

      Success Sequence of call ..

      1) myFunction

      2) send_myFunction

      3) TService_myFunction_args

      4) recv_myFunction

      5) TService_myFunction_result

       

      Failure Sequence of Call ..

      1) myFunction

      2) send_myFunction

      3) recv_myFunction

      All though i am receiving response on both call but there is slight difference between them here it is the difference.

      Success Response => {"success": responseObj, "ex": null}

      Failure Response => {"success": responseObj}

      so in my nodejs generated library the code is something like this and it is failing.

      if (null !== result.ex)

      {   //null !== undefined which is true. return callback(result.ex); }

      if (null !== result.success)

      { return callback(null, result.success); }

      please help here what needs to be done.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bmg.goswami bhavesh goswami
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: