The method you're decorating internally commits the response in case of an XHR request. By the time your code runs the response can no longer be modified.
[image: 5oosh_LOGO_FINAL_web-02] *Ido Dovrat | CEO* *T*: +972-77-5517453 *M*: +972-54-4264831 *F*: +972-77-5517454 *A*: 5 Kinneret St, Bnei Brak 5126237, Israel On Thu, Sep 10, 2015 at 5:56 PM, Nathan Quirynen < nat...@pensionarchitects.be> wrote: > Hi, > > How can I set a redirect when an exception has been thrown? > > I tried the following: > > @Match("RequestExceptionHandler") > public static RequestExceptionHandler > decorateRequestExceptionHandler(final Response response) { > return new RequestExceptionHandler() { > > @Override > public void handleRequestException(Throwable exception) throws > IOException { > response.sendRedirect("http://www.google.be"); > } > > }; > } > > But this seems to only work for non-XHR requests? Or did I forget > something here? > > Nathan > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >