users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: Exception getMessage() on the client side

From: Bill Burke <bburke_at_redhat.com>
Date: Tue, 04 Sep 2012 09:24:35 -0400

On 9/4/2012 8:30 AM, Sergey Beryozkin wrote:
> Hi
>
> Suppose we have a server returning 500 and also choosing to add some
> text in the response body.
>
> We can write:
>
> catch (ServerErrorException ex) {
>
> String errorMessage = ex.getResponse().readEntity(String.class);
>
> }
>
> Would it make sense to request that
>
> ex.getMessage() is equivalent to ex.getResponse().readEntity(String.class);
>
> ?
>
> Cheers, Sergey

I would say no.

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com