You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Nick Daugherty (JIRA)" <ji...@apache.org> on 2013/05/13 01:49:16 UTC

[jira] [Commented] (THRIFT-1853) Error when leaving struct field null in Client

    [ https://issues.apache.org/jira/browse/THRIFT-1853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13655680#comment-13655680 ] 

Nick Daugherty commented on THRIFT-1853:
----------------------------------------

It appears this issue may have been fixed or it may have been an implementation problem, as I can no longer reproduce. 
                
> Error when leaving struct field null in Client
> ----------------------------------------------
>
>                 Key: THRIFT-1853
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1853
>             Project: Thrift
>          Issue Type: Bug
>          Components: Node.js - Library
>            Reporter: Nick Daugherty
>
> When sending a struct over the wire from the client, the following error is produced if one or more struct fields are left void or set to null, even if marked as optional in the definition.
> I figure the buf from transport.js ~line 119 is null when that field hasn't been set, hence the 'has no method "copy"' error.
> Object #<Object> has no method 'copy'","name":"TypeError","stack":"TypeError: Object #<Object> has no method 'copy'  
> at node_modules/thrift/lib/thrift/transport.js:119:17    
> at Array.forEach (native)    
> at Object.TFramedTransport.flush (node_modules/thrift/lib/thrift/transport.js:118:21)    
> at Object.MyServiceClient.send_myMethod (thrift/gen-nodejs/MyService.js:873:22)    
> at Object.TimersServiceClient.myMethod (thrift/gen-nodejs/MyService.js:855:8)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira