[jax-rs-spec users] [jsr339-experts] Re: Re: Re: Re: Re: Re: Re: Re: Re: Concerns about the client-side exception hierarchy

From: Sergey Beryozkin <>
Date: Fri, 30 Mar 2012 16:33:08 +0100

Hi Bill,
On 30/03/12 11:18, Bill Burke wrote:
> On 3/30/12 5:31 AM, Sergey Beryozkin wrote:
>> Hi Bill
>> On 29/03/12 16:26, Bill Burke wrote:
>>> You could punt on server-side exceptions and just have a client
>>> hierarchy. (If we went the ClientResponse route).
>> I guess it would be the only option in this case as far as the
>> introduction of child (server) exceptions is concerned, I'm however
>> becoming 'fond' of your original idea of the app developer being able to
>> 'throw new BadClientRequestException()'. I think if we can not reuse
>> such exception then at this stage we should punt on all the child
>> exceptions and simply refactor a bit the current client-side hierarchy
>> as was suggested originally and review the idea in post 2.0
> Ya, I'm fond of it too. It works really nice in practice. I just know
> we'll have some lame 'Spring-JAXRS" project that will do just this...
> BTW, I still think ClientResponse extending Response would solve the
> problem.
we should get then Marek and Santiago supporting it and we are done :-).
I think the major concern from Marek is the case of WAE escaping and
client suddenly facing the need to optionally deal with Response where
we also have ClientResponse, it's the edge case, may only happen in
the catch-all blocks, WAE.getResponse().getStatus() would probably be
enough for many 400+ cases...The cast to ClientException would rarely be

still may be something better can be thought of, lets see :-)


> Bill