[
https://issues.apache.org/jira/browse/THRIFT-809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14155500#comment-14155500
]
ASF GitHub Bot commented on THRIFT-809:
---------------------------------------
GitHub user noazark opened a pull request:
https://github.com/apache/thrift/pull/232
THRIFT-809 JavaScript required fields
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/noazark/thrift thrift-809
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/thrift/pull/232.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #232
----
commit 9a52eed5c371336c295a57cbb538c786531841dd
Author: Noah H. Smith <[email protected]>
Date: 2014-10-01T17:14:37Z
THRIFT-809 JavaScript required fields
- Moved TPRotocolException into index.js, just like the other exceptions
- Compiler now generates exception handling for missing required fields
----
> Javascript client: Please make required fields actually required.
> ------------------------------------------------------------------
>
> Key: THRIFT-809
> URL: https://issues.apache.org/jira/browse/THRIFT-809
> Project: Thrift
> Issue Type: Improvement
> Components: JavaScript - Compiler
> Reporter: Jordan
>
> If fields are marked as required then I think that we should be forced to
> supply all of them, even if supplied with null values. Currently, I am able
> to construct an object without all of the required fields, send it to my
> backend, and nowhere does an error occur before sending. This should fail
> fast at the client. Instead, on the server I get null values. Null is so
> different than unspecified.
> Thanks!
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)