thanks for the update!
On Tue, Oct 9, 2012 at 4:04 PM, Daniel Bevenius
We have pushed https://issues.jboss.org/browse/AEROGEAR-426
means that you are now able to specify error routes to handle
For example, you can now specify an error route as follows:
If any of the routes following throws an AeroGearSecurityException,
the above error route will be used to handle it. You can specify as
many exceptions like the one above as you like.
You can also specify multiple exceptions in the on() method, which
will all be handled by the same error route:
If you want a general error route for all of your routes, you can
specify one like this:
At the moment this order might not be intuitive (I'm to blame for
this) and there is JIRA (https://issues.jboss.org/browse/AEROGEAR-522
that suggest that the more general exception should be at the top.
Lastly, if you don't specify any error route, a default one will used.
We are currently working on making this as attractive as possible but
at the moment it is very basic.
For a real code example:
Try it out:
- As mentioned the order of error routes should probably be reversed
- Currently only GET request are supported
- Support for REST clients (https://issues.jboss.org/browse/AEROGEAR-515
- Default error page
- Support for returning a different exception then the one that is
thrown inside of the route
aerogear-dev mailing list