title: when onFailure will call - ${remoteFunction -Grails
body: <p>My code is this:</p>
  
  <pre><code>${remoteFunction(controller:'user', action:'clearCache', 
  params:'\'&amp;cacheUserId=\' + cacheUserId + \'&amp;pageName=\' + pageName', 
  onSuccess: 'onSuccess()', 
  onFailure: 'onFailure()') };
  </code></pre>
  
  <p>in my controller action method</p>
  
  <pre><code>clearCache(){
  
    def status = getBusiness(); // this method returns boolean only.
    if(status==true){
    render "Success"}
    else render "Failure"
  }
  </code></pre>
  
  <p>new it is calling onSuccess() javascript function always.</p>
  
  <p>so I deleted else block then it not calling onFailue/onSuccess in case of status is false.</p>
  
  <p>can i know when onFailure will call, how can i make it call in case of status is false.</p>