Exception Handling with RestDispatch

25 views
Skip to first unread message

Arpit Tripathi

unread,
Sep 15, 2014, 1:12:19 AM9/15/14
to gwt-pl...@googlegroups.com
How can I find out which exception was thrown by server with RestDispatch? Are there any guidelines/documentation which I'm missing?

For exceptions that extend WebApplicationException (using Jersey on backend), onFailure() tells that exception is ActionException and "detailMessage" is text representation of status code (e.g. caught.getMessage() = "Bad Request" for status code 400). If exception does not extend WebApplicationException then "detailMessage" is actual message set by service.

I can pull out some information by using RestCallback#setResponse() method. Is that ideal way to handle exceptions with GWTP RestDispatch? 

Is it possible to receive actual exception (thrown by service) in onFailure() method?

Thanks.
Reply all
Reply to author
Forward
0 new messages