title: google.run.script is not giving error from javascript call
body: <p>I am trying to figure out server/client data type matching. In the html with javascript, form itself is supposed to be sent to google code.gs.</p>
  
  <pre><code>&lt;body&gt;
  &lt;form id='form1'&gt;
      &lt;div&gt;
       ....buttons and input texts...
      &lt;/div&gt;
  </code></pre>
  
  <p>-- here the last button's onclick I call 
  lSubmit(this.parentNode)</p>
  
  <pre><code>&lt;button type="button" 
  onclick="lSubmit(this.parentNode)" 
  id=btn&gt;click&lt;/button&gt;
  
  &lt;/form&gt;
  &lt;script&gt;
  var x = $("#output");
  
  function lSubmit(formObj) {
      x.html('Wait until verified.');
      google.script.run
        .withSuccessHandler(onSuccess)
        .withFailureHandler(onFailure1)
        .chkForm(formObj);
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>As I was not well aware of parentNode, it took whole day for me to figure out what my mistake was. Because I used 'div' after form, lSubmit was taking div.</p>
  
  <p>My question is,</p>
  
  <p>code.gs</p>
  
  <pre><code>function chkForm(formObj) {
    Logger.log("chkForm in Code.js called. id: %s",formObj.uname);
    return 'You entered id' + formObj.uname + ' to login...'; 
  }
  </code></pre>
  
  <p>As I was sending div, but chkForm wants to receive form, isn't there supposed to be some error code returned? But in the server log doesn't say 'undefined' or object type or formObj.uname doesn't exist kind
  of sorts. Nor end result in javascript withSuccessHandler, withFailureHandler. Actually, lSubmit wasn't called I think. Because I didn't see the comment Wait until verified. </p>
  
  <p>Just like some typo, this time was too difficult what went wrong.</p>
  
  <p><em>Last question I asked was also ended up wrong in data handling where server returns date but javascript can't handle. But in that case, withFailureHandler worked. So it was figured out quickly.</em>
  <strong>However, now, what should I add to where so that I can catch that there is an error in data type mismatch between server and client? Like in this case, that client is sending wrong data?</strong></p>
  
  <p>Is it javascript refusing to run as it saw mismatching?</p>