title: How can you report or display an error from an XSP.partialRefreshPost call
body: <p>I am using custom event handlers for many parts of our application.  Tim Tripcony describes this <a href="http://www.timtripcony.com/blog.nsf/d6plinks/TTRY-84B6VP" rel="nofollow">in his blog</a>... He will, most likely (hopefully) answer this...</p>
  
  <p>The event handlers in my code look like this:</p>
  
  <pre><code>    &lt;xp:eventHandler
          id="newbsDoSomething"
          submit="true"
          event="calledbyid"
          refreshMode="complete"&gt;
          &lt;xp:this.action&gt;
              &lt;![CDATA[#{javascript:doSomethingFromSomewhere();}]]&gt;
          &lt;/xp:this.action&gt;
      &lt;/xp:eventHandler&gt;
  </code></pre>
  
  <p>The buttons or other controls execute these events with code that look like this:</p>
  
  <pre><code>XSP.partialRefreshPost(("#{id:newbsDoSomething}", {
      params : {
          '$$xspsubmitvalue' : 'something that tells it what to do.'
      },
      onError : function(err) {
              alert('Whatever this method is doing got an error...');
              //I want to report the error here
      },
      onComplete : function() {
          // maybe do something else
      })
  });
  </code></pre>
  
  <p>When I make a mistake (once in a blue moon) and the response to the AJAX request contains a stack trace. I want to put up a button that optionally renders the stack trace in another page.</p>
  
  <p>In the onError method the err is undefined, so that is not helping. I do not see a property of the XSP object that would contain the response. I can see the response in the Firebug console, but how would I get it pragmatically?</p>
  
  <p>/Newbs</p>